nginx设置ssl跳转到443端口(301跳转)

看配置,你懂的




	server {
	        listen 80;
	        server_name example.org;
	      #  rewrite ^(.*) https://$server_name$1 permanent;

               if (  $scheme = 'http' )  {
                   return 301 https://www.example.org$request_uri;
             }
              if ( $host != 'www.example.org' )  {
                    return 301 https://www.example.org$request_uri;
              } 
	}




此处评论已关闭