Nginx的非HTTPS的网站重定向到其他网站HTTPS

nginx配置文件加入模块

server {
    listen 443 ssl http2;
    server_name ship.zhonggu56.com;
    rewrite ^/(.*) http://$server_name/$1 permanent;
}