禁止通过ip地址访问(http)
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 400;
}
禁止通过ip地址访问(https)
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_certificate 3935979_www.icjs.com.pem;
ssl_certificate_key 3935979_www.icjs.com.key;
server_name _;
return 400;
}
禁止通过ip地址问(http&&https)
server {
listen 80 default;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_certificate 3935979_www.icjs.com.pem;
ssl_certificate_key 3935979_www.icjs.com.key;
server_name _;
return 400;
}