Forum: NGINX Proxying with/without listen in server block

2974d09ac2541e892966b762aad84943?d=identicon&s=25 tcbarrett (Guest)
on 2013-08-14 11:09
(Received via mailing list)
Does having a listen directive in a server block over ride blocks

I have a slightly complex set up, proxying traffic depending on url to
various other machines on the network.

Something a bit like this:

The middle block hogs all the traffic, and all requests are sent to

What am I missing?

Posted at Nginx Forum:,241824,241824#msg-241824
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tcbarrett (Guest)
on 2013-08-14 11:49
(Received via mailing list)
Am I missing this:

"If a server is the only server for a listen port, then nginx will not
server names at all (and will not build the hash tables for the listen
port). However, there is one exception. If a server name is a regular
expression with captures, then nginx has to execute the expression to
the captures."

Posted at Nginx Forum:,241824,241826#msg-241826
36a8284995fa0fb82e6aa2bede32adac?d=identicon&s=25 Francis Daly (Guest)
on 2013-08-14 12:51
(Received via mailing list)
On Wed, Aug 14, 2013 at 05:48:38AM -0400, tcbarrett wrote:

Hi there,

> Am I missing this:

I think you're missing this:

coupled with the default value for "listen", as in "what is meant by not
having a listen in a server block", which is at

The answer to your original question:

> Does having a listen directive in a server block over ride blocks without?

is "yes, if the listen directive is different from the default".

Francis Daly
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.