使用如下配置即可
server {
listen 80;
server_name www.test.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
使用如下配置即可
server {
listen 80;
server_name www.test.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
}