Nginx将http重定向https

概述

将访问http80端口的服务重定向到https443端口。

http配置

server {
    listen       80;
    server_name  你的域名;
    client_max_body_size 10M;
    rewrite ^(.*)$ https://$host$1 permanent;
}

Guess you like

Origin blog.csdn.net/weixin_39510828/article/details/120021800