Resolve hostname to IPv6 address in listen directive

Piotr Sikora piotr.sikora at
Wed Aug 25 22:01:17 MSD 2010


> Note well: listen with hostname always uses *one* address returned 
> by hostname lookup, the first one returned by gethostbyname().  It 
> doesn't make sense to attempt to use it with hostname which 
> resolves to multiple addresses.

But is that correct behavior? Shouldn't nginx listen on all of them?
> I believe correct solution would be to make
>    listen;
> to use ipv6 address if no ipv4 addresses were found.

Why not on both?

Best regards,
Piotr Sikora < piotr.sikora at >

More information about the nginx-devel mailing list