Site should not be accessed through IP

FinalX nginx-forum at nginx.us
Thu Apr 9 18:13:06 UTC 2015


You could use an extra host config with a default_server, like so:

server {
    listen       80  default_server;
    server_name  _;
    return       444;
}

You can find this example on http://nginx.org/en/docs/http/server_names.html

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,257927,257928#msg-257928



More information about the nginx mailing list