Nginx强制跳转https
我们只需要修改nginx配置 if ($server_port !~ 443){ rewrite ^(/.*)$ https://$host$1 permanent; } 完整配置示例: server { listen 80; listen 443 ssl http2; server_name xxx.cn www.xxx.cn; index index.php index.html index.htm default.php default.htm default.html; root /www/test/xxx; ssl_certificate /www/te