server
{
	listen 80;
	server_name www.domain.com domain.com;

	rewrite ^(.*)$ https://$server_name$1 permanent;
}

 

Centos + nginx站点配置SSL强制跳转443
https://fanly.net/article/3MjYu4NTRh
转载请注明出处,谢谢!