server_name behaviour

Ensiferous nginx-forum at
Mon Sep 13 22:47:58 MSD 2010


A couple of us in the IRC channel are keeping the wiki updated and we've
come across some inconsistent behaviour with server_name.

The wiki currently states here:
that server_name _; is treated specially for requests with no Host
header, however, on the latest dev version this is not so.

If a request on the IP or on a domain without a matching server_block
comes in then Nginx will either choose the server block with
default_server flag in listen or the first one defined.

Question is, is this is a bug or should we update the wiki to no longer
mention _?

Martin Fjordvald

Posted at Nginx Forum:,130108,130108#msg-130108

More information about the nginx mailing list