nginx 80端口强制转443
server {
listen 80;
server_name test.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
server {
listen 443 ssl;
server_name test.com;
}
2024-01-06 18:03:10
server {
listen 80;
server_name test.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
server {
listen 443 ssl;
server_name test.com;
}