提问三步曲: 提问先看教程/FAQ索引(wdcp,wdcp_v3,一键包)及搜索,会让你更快解决问题
1 提供详细,如系统版本,wdcp版本,软件版本等及错误的详细信息,贴上论坛或截图发论坛
2 做过哪些操作或改动设置等
温馨提示:信息不详,很可能会没人理你!论坛有教程说明的,也可能没人理!因为,你懂的
本帖最后由 cici9911 于 2017-8-10 00:35 编辑
wdCP版本为 v3.2.12。站点已经成功上传cert和key文件,并且设置强制开启SSL,并且http和https均可以正常打开访问站点,但是用http访问的时候,并不会强制跳转到https,请问是什么情况!目前是A+N引擎!强制开启SSL后,发现nginx的conf文件并没有什么变化,还是如下:
- server {
- listen 80;
- root /www/web/xxx_com/public_html;
- server_name xxx.com www.xxx.com;
- index index.html index.php index.htm;
- error_page 400 /errpage/400.html;
- error_page 403 /errpage/403.html;
- error_page 404 /errpage/404.html;
- error_page 503 /errpage/503.html;
- location ~ \.php$ {
- proxy_pass http://127.0.0.1:88;
- include naproxy.conf;
- }
- location ~ /\.ht {
- deny all;
- }
- location / {
- try_files $uri @apache;
- }
- location @apache {
- internal;
- proxy_pass http://127.0.0.1:88;
- include naproxy.conf;
- }
- }
复制代码
另外,参照其他教程分别尝试添加了如下代码,添加后http和https均无法正常访问:
代码1:
- if ($server_port = 80) {
- return 301 https://$host$request_uri;
- }
复制代码
代码2:
- listen 443 ssl;
- ssl on;
- ssl_certificate /www/wdlinux/nginx/conf/cert/xxx.com.cert;
- ssl_certificate_key /www/wdlinux/nginx/conf/cert/xxx.com.key;
复制代码 |