Welcome! Log In Create A New Profile

Advanced

Nginx servers on both *:80 and <ip>:80? also duplicate listen parameters error when binding by just specific ips

CJ Ess
March 31, 2016 01:30PM
I would like to have an Nginx setup where I have specific logic depending
on which interface (ip) the request arrived on.

I was able to make this work by having a server stanza for each ip on the
server, but was't able to do a combination of a specific ip and a wildcard
ip (as a catchall) - is there a way to do that with some option combination
(i.e. nginx listens on *:80, but matches the server stanza by ip?)

The scenario I'm playing towards is that I have a dedicated connection to a
CDN and I want to pass thru certain headers if they arrive via the
dedicated interface, strip them if they arrive on other interface.

When I did the server{} per IP approach nginx complained about duplicate
listen settings for the second IP even though both server stanzas were
bound to a specific port/interface. Is this a bug per chance?

This was with Nginx 1.9.0 btw, perhaps newer versions have a different
behavior?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx servers on both *:80 and <ip>:80? also duplicate listen parameters error when binding by just specific ips

CJ Ess March 31, 2016 01:30PM

Re: Nginx servers on both *:80 and <ip>:80? also duplicate listen parameters error when binding by just specific ips

Francis Daly March 31, 2016 04:30PM

Re: Nginx servers on both *:80 and <ip>:80? also duplicate listen parameters error when binding by just specific ips

CJ Ess April 02, 2016 04:38PM

Re: Nginx servers on both *:80 and <ip>:80? also duplicate listen parameters error when binding by just specific ips

CJ Ess April 29, 2016 05:14PM

Re: Nginx servers on both *:80 and <ip>:80? also duplicate listen parameters error when binding by just specific ips

Francis Daly April 30, 2016 04:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 221
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready