Resolve hostname to IPv6 address in listen directive

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


Hi,

> 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 example.com;
> 
> to use ipv6 address if no ipv4 addresses were found.

Why not on both?

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >
 



More information about the nginx-devel mailing list