Welcome! Log In Create A New Profile

Advanced

Re: nginx default server not used

June 09, 2012 04:41AM
Hello

I have found another possible cause for nginx to ignore default server
I have encountered it just now, and it is not your case, but maybe it would be helpful for someone

At example:

server {
listen 80 default_server;
server_name default.domain.dom;
................
}

server {
listen <particular.ip>:80;
server_name some.server.domain.dom;
..................
}

In this case, listening schema for the default server is _not_the_same_ as for another server.
Considering the fact that we have described a server with the particular ip address, our default server for that ip (although it is listening on all IPs) would be ignored, and all queries to that particular ip, even with "Host: default.domain.dom", would be directed to "some.server.domain.dom" as it becomes a default (first-described) server for this listening schema.
We have to explicitly describe "listen <particular.ip>:80" on the default server to enable it for this schema.

WBW, valinor
Subject Author Posted

nginx default server not used

rj February 19, 2012 02:23PM

Re: nginx default server not used

Maxim Dounin February 19, 2012 04:04PM

Re: nginx default server not used

rj February 19, 2012 04:17PM

Re: nginx default server not used

Nginx User February 19, 2012 05:14PM

Re: nginx default server not used

rj February 20, 2012 01:41AM

Re: nginx default server not used

valinor June 09, 2012 04:41AM

Re: nginx default server not used

Ruslan Ermilov June 13, 2012 02:14AM

Re: nginx default server not used

Edho Arief February 19, 2012 08:18PM

Re: nginx default server not used

rj February 20, 2012 01:33AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 78
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready