nginx http to https
[*]server[*] {
[*] listen 80;
[*] #listen [::]:80;
[*] server_name www.xxx.com xxx.com;
[*]
[*] location ~ /.well-known {
[*] root/data/wwwroot/www.xxx.com;
[*] allow all;
[*] }
[*]
[*] location / {
[*] rewrite ^/(.*)$ https://www.xxx.com/$1 permanent;
[*] }
[*] }复制代码
现在访问 http://www.xxx.com 会跳到https
访问 https://www.xxx.com 还是301
哪出错了 请问你的ssl配置跑哪儿去了?
toyst 发表于 2018-5-8 23:40
请问你的ssl配置跑哪儿去了?
ssl 没贴出来
只要把 rewrite ^/(.*)$ https://www.xxx.com/$1 permanent; 给注释 Https 访问是正常的
ssl 的server 没有301 前面是不是还加了CDN或者是反向代理?
rooney 发表于 2018-5-8 23:44
前面是不是还加了CDN或者是反向代理?
cf 的cdn 没有反向代理
cooc123 发表于 2018-5-8 23:45
cf 的cdn 没有反向代理
所以CF的CDN配置的源站是不是用的HTTP?
cooc123 发表于 2018-5-8 23:45
cf 的cdn 没有反向代理
cf 是不是启用强制 https
rooney 发表于 2018-5-8 23:46
所以CF的CDN配置的源站是不是用的HTTP?
这个怎么看 下面这几行的意思是无论http还是https,只要请求/目录都重定向到https明显有问题。
[*]location / {
[*] rewrite ^/(.*)$ https://www.xxx.com/$1 permanent;
[*] }复制代码 https://www.hs2v.com/forum.php?mod=viewthread&tid=448151
页:
[1]