server_name "";

Sean Allen sean at
Sat Dec 19 01:14:52 MSK 2009

we are running 0.7.64

have this as a server:

    server_name "";

    location /
        return 404;

when we try to startup we get:

 [emerg]: the first server name must not be empty in

wiki says:

Since nginx 0.7.12, an empty server name is supported, to catch the
requests without "Host" header:

server {
  server_name "";

is the wiki wrong?

if yes and  i want to have a server that returns nothing if there isnt
matching a hostname, how
do I do that?

More information about the nginx mailing list