proxy_pass ignoring gai.conf/RFC3484

Maxim Dounin mdounin at
Mon Jan 5 04:17:45 UTC 2015


On Fri, Jan 02, 2015 at 04:13:40PM +0100, Ivan Vilata i Balaguer wrote:


> BUT if I configure NginX with ``proxy_pass http://internal_machine;``,
> it always insists in using the IPv4 address first, regardless of what
> ``gai.conf`` says.  The only way I have to force IPv6 first is
> hardwiring it in the URL (which is ugly) or including the resolution in
> ``/etc/hosts`` (which disperses configuration).
> Is this behaviour expected?  Maybe I missed some configuration aspect?

If a name in proxy_pass resolves to multiple addresses, nginx will 
use them all with round-robin balancing algorithm.

Maxim Dounin

More information about the nginx mailing list