天天看点

nginx 配置http重定向到https

在80端口的那个server下,添加如下:

server_name  www.youwebsite.com youwebsite.com;

rewrite ^(.*)$ https://$host$1 permanent;      
nginx 配置http重定向到https

然后访问 www.网站.com  网站.com

会自动跳转到https下

官网itzixi.com

微信公众号:BeJavaGod

新浪微博

知乎

简书

cnblogs

今日头条

豆瓣

--> 同步更新

nginx 配置http重定向到https
nginx 配置http重定向到https
nginx 配置http重定向到https