配置文件如下 listen 80; #listen [::]:80;
server_name www.example.com ; return 301 https://$host$request_uri;訪問(wèn)https://www.example.com 顯示正常,但是訪問(wèn)http://www.example.com 網(wǎng)站301定向到https之后顯示是https://%2A.example.com 而不是:https://www.example.com, 并且在配置文件中取消301跳轉(zhuǎn)之后,訪問(wèn)http://www.example.com 仍然顯示 https://%2A.example.com想請(qǐng)問(wèn)下是nginx配置文件的原因嗎
2 回答

尚方寶劍之說(shuō)
TA貢獻(xiàn)1788條經(jīng)驗(yàn) 獲得超4個(gè)贊
這是我的配置的,可以正常跳
listen 443 ssl; listen [::]:443 ssl; ssl on; ssl_certificate /path/xx.crt; ssl_certificate_key /path/xx.key; error_page 497 https://$host$uri?$args;
- 2 回答
- 0 關(guān)注
- 3955 瀏覽
添加回答
舉報(bào)
0/150
提交
取消