IPv6 enabled Nginx default bind port
Igor Sysoev
is at rambler-co.ru
Sun Sep 27 19:18:22 MSD 2009
On Sun, Sep 27, 2009 at 05:26:05AM -0400, kuisma wrote:
> Igor Sysoev Wrote:
> -------------------------------------------------------
>
> > No, you just need to set:
> >
> > listen [::]:80 default ipv6only=on;
> >
> > because Linux bind()s to both ipv4 and ipv6 by default.
>
> Oh, how embarrassing, this is basically what you already said above ... Sorry 'bout that.
>
> I found the most intuitive solution was binding to explicit addresses, not using the wild card [::], this way no conflicts occurred, trying to bind an IPv4 address when IPv6 asked.
>
> The default ipv6only=yes worked as well, but a bit contra-intuitive. It might give the impression the entire server block is only to listen to IPv6, not only this listen directive exclusively. Also, the default keyword itself might be somewhat confusing; a local server block parameter affecting the global listen/bind parameters affecting all other server definitions. I'm actually not sure I understand it myself correctly.
>
> I'll try to write something clarifying this in the wiki.
I agree that "default" keyword may confuse. Probably, it should be renamed
to the "default_server" to indicate that this "server" block will handle
requests to given address:port if no matching virtual host is found.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list