IPv6 enabled Nginx default bind port

Igor Sysoev is at rambler-co.ru
Sun Sep 6 12:00:39 MSD 2009


On Sun, Sep 06, 2009 at 11:53:48AM +0400, Igor Sysoev wrote:

> On Sun, Sep 06, 2009 at 03:39:12AM -0400, zobo wrote:
> 
> > 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.
> 
> I do not understand your problem, but have you tried to
> 
>    listen  [::]:80 default ipv6only;

Sorry,

-    listen  [::]:80 default ipv6only;
+    listen  [::]:80 default ipv6only=on;


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list