nginx http跳转https 1.利用rewrite进行地址重写 server { listen 192.168.1.111:80; server_name test.com; rewrite ^(.*)$ https://$host$1 permanent; #地址重写 }