Nginx configure http to https

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

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

 

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

 

update new syntax

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

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

 https://segmentfault.com/q/1010000006994159

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326281772&siteId=291194637