server_name behaviour

Igor Sysoev igor at sysoev.ru
Mon Sep 13 22:53:04 MSD 2010


On Mon, Sep 13, 2010 at 02:47:58PM -0400, Ensiferous wrote:

> Hi
> 
> 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:
> http://wiki.nginx.org/NginxHttpCoreModule#server_name
> 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 _?

Please read this:
http://nginx.org/en/docs/http/server_names.html#miscellaneous_names


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list