Nginx配置http转https

阅读更多
server {  
    listen  80;  
    server_name qianguo.com www.qianguo.com;

    rewrite ^(.*)$ https://$host$1 permanent;
}

 

https://www.cnblogs.com/yun007/p/3739182.html

 

更新新的语法

server {
    listen 80;
    server_name qianguo.com www.qianguo.com;

    return 301 https://$server_name$request_uri;
}

 https://segmentfault.com/q/1010000006994159

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(Nginx配置http转https)