天天看點

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