把nginx服务的http页面重定向到https写法:

server {
	listen	  80;
	server_name    www.example.com;
	return	  301 https://$server_name$request_uri;
}

server {
	listen	  443;
	server_name    www.example.com;

	[....]
}

 

Comments are closed.

Post Navigation