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.
Thank you,
-- Kuisma