RegEx VHost name and the default VHost

Valentin V. Bartenev vbart at nginx.com
Wed Jan 23 22:30:21 UTC 2013


On Thursday 24 January 2013 00:54:22 automatix wrote:
> Thank you very much for the usefull links and the tip. Yes, the vhost
> default was not default. Now I've set it to default explicitly with the
> flaf default_server and everything works fine!
> 
> Thank you, Valentin!
> 
> Since "default server is the first one"
> (http://nginx.org/en/docs/http/request_processing.html), the problem must
> have been, that the server couldn't find a vhost for the request and just
> took the first vhost. But what ist "the first" vhost, when all vhosts are
> stored in different files?
>
> In which order are the vhost files processed?
> 

Actually there is no such thing like "the vhost files" in nginx.
You probably mean those files included from nginx.conf by the
"include" directive (see: http://nginx.org/r/include ).

Before nginx 1.3.10 the order was arbitrary. Since version
1.3.10 they sorted alphabetically on unix systems.

Please note, such directories like "sites-enabled" and
"sites-available" are not something common for nginx.
In fact, they created by nginx package on some linux systems
because the maintainers of these packages find it convenient.

  wbr, Valentin V. Bartenev

--
http://nginx.com/support.html
http://nginx.org/en/donation.html



More information about the nginx mailing list