location "default" documentation
Igor Sysoev
is at rambler-co.ru
Wed Jan 14 19:49:50 MSK 2009
On Wed, Jan 14, 2009 at 08:33:47AM -0800, James Byers wrote:
> On Wed, Jan 14, 2009 at 6:01 AM, Igor Sysoev <is at rambler-co.ru> wrote:
> > On Tue, Jan 13, 2009 at 09:40:10PM -0800, James Byers wrote:
> >
> > server {
> > listen 1.2.3.4:80;
> > server_name one;
> > }
> >
> > server {
> > listen 1.2.3.4:80 default;
> > server_name two;
> > }
>
> "server_name" suggests the first server block in configuration file
> order will be used for non-matching hostnames. In the above listing
> (modified to include "default" in the second server), will a request
> for hostname "three" / IP 1.2.3.4 be handled by the second server
> block or the first?
Non-matching hostnames are handled in server which has "listen" marked
as "default" for given address:port, i.e. hostname "three" / IP 1.2.3.4
will be handled by the second server block.
> >> And I'm left wondering how to set all sockets to deferred.
> >
> > You need to set
> >
> > listen ADDRESS:PORT default deffered;
> >
> > once for each ADDRESS:PORT.
> >
>
> Thanks for the clarification. Will update the wiki for both cases.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list