全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 706|回复: 2
打印 上一主题 下一主题

请教个SSL的问题

[复制链接]
跳转到指定楼层
1#
发表于 2017-4-18 09:51:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
网站LNMP的,弄好了SSL,直接访问网站https://www.xxx.com出现下载页面
111.png (18.39 KB, 下载次数: 0)
访问https://www.xxx.com/index.php就能正常显示,请问这样怎么弄?
HTTP访问都正常
下面是配置文件
  1. server
  2.     {
  3.         listen 80;
  4.                 listen 443;

  5.         #listen [::]:80;
  6.                 ssl on;
  7.         ssl_certificate /usr/local/nginx/conf/www.xxx.com.crt;
  8.         ssl_certificate_key /usr/local/nginx/conf/www.xxx.com.key;
  9.         server_name www.xxx.com xxx.com;
  10.         index index.php;
  11.         root  /home/wwwroot/www.xxx.com;

  12.         include none.conf;
  13.         #error_page   404   /404.html;

  14.         # Deny access to PHP files in specific directory
  15.         #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

  16.         include enable-php.conf;

  17.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  18.         {
  19.             expires      30d;
  20.         }

  21.         location ~ .*\.(js|css)?$
  22.         {
  23.             expires      12h;
  24.         }

  25.         location ~ /.well-known {
  26.             allow all;
  27.         }

  28.         location ~ /\.
  29.         {
  30.             deny all;
  31.         }

  32.         access_log off;
  33.     }
复制代码


特殊原因,域名隐去了,麻烦帮忙看下,谢谢
2#
发表于 2017-4-18 10:51:37 | 只看该作者
本帖最后由 nic2013 于 2017-4-18 10:55 编辑

这个是我的,参考一下。

  1. server
  2.         {
  3.         listen 443 ssl;
  4.         #listen [::]:443 ssl spdy;
  5.         server_name     o00p.com www.o00p.com;
  6.         index index.html index.htm index.php default.html default.htm default.php;
  7.         root  /home/wwwroot/www.o00p.com;

  8.         ssl on;
  9.         ssl_certificate /root/ssl/o00p.com.crt;
  10.         ssl_certificate_key /root/ssl/o00p.com.key;
  11.         ssl_session_timeout 5m;
  12.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  13.         ssl_prefer_server_ciphers on;
  14.         ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:RC4-SHA:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!DSS:!PKS;
  15.         ssl_session_cache builtin:1000 shared:SSL:10m;
  16.         
  17.         include none.conf;
  18.         #error_page   404   /404.html;
  19.         include enable-php.conf;

  20.         location /nginx_status
  21.         {
  22.             stub_status on;
  23.             access_log   off;
  24.         }

  25.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  26.         {
  27.             expires      30d;
  28.         }

  29.         location ~ .*\.(js|css)?$
  30.         {
  31.             expires      12h;
  32.         }

  33.         access_log  /root/log/www.o00p.com.log;
  34. }

  35. server
  36.         {
  37.         listen          80;
  38.         server_name o00p.com www.o00p.com;
  39.         return 301 https://o00p.com$request_uri;
  40. }
复制代码
3#
发表于 2017-4-18 11:00:14 | 只看该作者
443和80分为两个容器,不要搞在一起。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-12-18 13:36 , Processed in 0.146540 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表