Site should not be accessed through IP

FinalX nginx-forum at
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

Posted at Nginx Forum:,257927,257928#msg-257928

More information about the nginx mailing list