nginx on Debian: dynamic network interfaces

Francis Daly francis at daoine.org
Wed May 27 13:20:21 UTC 2015


On Wed, May 27, 2015 at 09:51:40AM +0200, B.R. wrote:

Hi there,

> Is there really nothing you can do on your side about it?
> It is a little tiresome to see both parts throwing the ball back.

If nginx sees host names in particular places in the config file, it
currently chooses to resolve them at start time.

I suspect it will be slow for you to get a patch that changes that
behaviour accepted into nginx.

You can configure your system resolver to avoid needing DNS, by putting
the host names into /etc/hosts.

You can configure your nginx to avoid resolving the host names, by one of:

* not using host names, instead using IP addresses
* using host names, and including an upstream{} which includes the IP address
* including a variable in the directive that includes the host name,
so nginx will not try to resolve it at start time

(which is pretty much the previous answer you got, but with a few specific
ways that you can implement it).

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list