http重定向https

server {
        listen 80;
        server_name localhost;
        return 301 https://$host$request_uri;
}

server {
        listen 443 ssl;
        server_name m.com.cn;
        #...
}

  

posted @ 2017-12-30 15:44  三百里江山  阅读(599)  评论(0编辑  收藏  举报