使用下面nginx配置
当请求协议为http时,重定向到https
1 2 3 4 5 6 |
server { listen 80; if ($scheme = 'http') { return 301 https://$server_name$request_uri; } } |
本着互联网开源、开放的精神和宗旨,本站所有内容可以随便传播。如需转载或分享无需说明来源。
有任何疑问或烦恼,欢迎评论区讨论。
670
石大力BLOG
暂无回复数据