参考文章:https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#taxing-rewrites
最新的写法:
server {
listen 80;
server_name xxx.abc.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443;
server_name xxx.abc.com;
}