nginx实现http请求重定向到https
https://blog.csdn.net/Y00010010/article/details/123808405
点击查看代码
server {
listen 80;
server_name test.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
// 或者 return 301 https://$server_name$request_uri;
}
https://blog.csdn.net/Y00010010/article/details/123808405
server {
listen 80;
server_name test.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
// 或者 return 301 https://$server_name$request_uri;
}