nginx 配置80端口和443端口的server name 区别

配置80端口的时候,需要写成server name www.80shihua.com


配置443端口的时候,需要写成server_name www.80shihua.com



server{

        listen 80;

        server name www.80shihua.com

}


server{

        listen 443 ssl;

        server_name www.80shihua.com;

}