99精品国产综合久久久久五月天,免费观看欧美大片毛片不用播放器 ,AV无码理论片在线观看免费网站,国产精品国产成人国产三级
標題:
[求助]
SSL開啟強制使用,但并不跳轉(zhuǎn),是否原因如下:
[打印本頁]
作者:
cici9911
時間:
2017-8-10 09:47
標題:
SSL開啟強制使用,但并不跳轉(zhuǎn),是否原因如下:
wdCP版本為 v3.2.12。站點已經(jīng)成功上傳cert和key文件,并且設(shè)置
強制開啟
SSL,并且http和https均可以正常打開訪問站點,但是用http訪問的時候,并不會強制跳轉(zhuǎn)到https,請問是什么情況!目前是A+N引擎!強制開啟SSL后,發(fā)現(xiàn)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;
}
}
復(fù)制代碼
另外,參照其他教程分別嘗試添加了如下代碼,添加后http和https均無法正常訪問:
代碼1:
if ($server_port = 80) {
return 301 https://$host$request_uri;
}
復(fù)制代碼
代碼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;
復(fù)制代碼
補充一句:我用了cloudflare的CND加速,是否和這個有關(guān)?
作者:
cici9911
時間:
2017-8-10 15:26
重裝了vps系統(tǒng)和wdcp,問題得以解決。conf文件有變化!可是新問題出現(xiàn),打開訪問 會存在重定向死循環(huán):
server {
listen 80;
root /www/web/xxx_com/public_html;
server_name xxx.com www.xxx.com;
rewrite ^(.*)$ https://$host$1 permanent;
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;
}
}
server {
listen 443;
root /www/web/xxx_com/public_html;
ssl on;
ssl_certificate cert/xxx.crt;
ssl_certificate_key cert/sxxx.key;
ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
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;
}
}
復(fù)制代碼
另外,選擇https啟用(非強制啟用)一切正常,最奇怪的是,選擇不啟用,https依然可以正常訪問!
歡迎光臨 WDlinux官方論壇 (http://fudaan.com/bbs/)
Powered by Discuz! 7.2