全球主机交流论坛
标题:
请教个SSL的问题
[打印本页]
作者:
rookiesoft
时间:
2017-4-18 09:51
标题:
请教个SSL的问题
网站LNMP的,弄好了SSL,直接访问网站https://www.xxx.com出现下载页面
(, 下载次数: 0)
上传
点击文件名下载附件
访问https://www.xxx.com/index.php就能正常显示,请问这样怎么弄?
HTTP访问都正常
下面是配置文件
server
{
listen 80;
listen 443;
#listen [::]:80;
ssl on;
ssl_certificate /usr/local/nginx/conf/www.xxx.com.crt;
ssl_certificate_key /usr/local/nginx/conf/www.xxx.com.key;
server_name www.xxx.com xxx.com;
index index.php;
root /home/wwwroot/www.xxx.com;
include none.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log off;
}
复制代码
特殊原因,域名隐去了,麻烦帮忙看下,谢谢
作者:
nic2013
时间:
2017-4-18 10:51
本帖最后由 nic2013 于 2017-4-18 10:55 编辑
这个是我的,参考一下。
server
{
listen 443 ssl;
#listen [::]:443 ssl spdy;
server_name o00p.com www.o00p.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.o00p.com;
ssl on;
ssl_certificate /root/ssl/o00p.com.crt;
ssl_certificate_key /root/ssl/o00p.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
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;
ssl_session_cache builtin:1000 shared:SSL:10m;
include none.conf;
#error_page 404 /404.html;
include enable-php.conf;
location /nginx_status
{
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /root/log/www.o00p.com.log;
}
server
{
listen 80;
server_name o00p.com www.o00p.com;
return 301 https://o00p.com$request_uri;
}
复制代码
作者:
deepflow
时间:
2017-4-18 11:00
443和80分为两个容器,不要搞在一起。
欢迎光临 全球主机交流论坛 (https://loc.010206.xyz/)
Powered by Discuz! X3.4