IPv6 enabled Nginx default bind port

zobo nginx-forum at nginx.us
Sun Sep 6 11:39:12 MSD 2009


Hi.
Прежде всего, болшое спасибо дла Nginx.

We are currently very much moving forward with IPv6 and I had a small problem with Nginx and I would like to give a suggestion. The problem was, that if we did not specify listen [::]:80 to every server declaration, nginx would fail to start. Naturally, because one listen declaration would open and AF_INET6 and another one would try to open AF_INET by default. As correct dualstack OS, AF_INET6 would also listen on AF_INET thus causing "98: Address already in use".

As the solution is simple - add listern declaration to all server declarations - it can be unpractical in case of many server declarations. What I would suggest is, if Nginx is compiled --with-ipv6 that it listens by default on AF_INET6. Another thing speaking for this is that this is how ipv6 enabled programs should work. Operate on ipv6, and let OS handle ipv4 to ipv6 mapping.

Thanks again for your great work.
Best regards,
-Zobo

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,5695,5695#msg-5695






More information about the nginx mailing list