Feature proposal: use names instead of IPv6 addresses

Hi all,

I’m doing some experiments with IPv6 and I’ve seen that the following
statement
in an nginx server block::

listen www.example.com:80;

Binds nginx to www.example.com’s IPv4 address, but not to its IPv6
address if
it has one (e.g. the name has an AAAA entry in DNS). I’m, however,
able to
specify the IPv6 address directly::

listen [1111:2222:3333::1]:80;

But using the name inside the brackets yields an “invalid IPv6 address”
error::

listen [www.example.com]:80;

So, wouldn’t it be nicer if nginx supported this syntax? Or maybe I’m
missing
something?

Another possibility would be for nginx to automatically bind to both
IPv4 and
IPv6 addresses associated to the name given in the listen directive,
but I
guess this should need more elaboration and some use cases.

Thanks,

::

Ivan Vilata i Balaguer – http://ivan.lovesgazpacho.net/

missing
something?

You are missing the fact that [1111:2222:3333::1] is valid IP address,
while
[www.example.com] is invalid hostname, therefore this proposition is
simply
wrong.

But yeah, it seems that nginx’s internal resolver doesn’t process AAAA
answers.

Best regards,
Piotr S. < [email protected] >