When running two vhosts, one of which listens on [::], the other on localhost,
nginx will fail with this error:
2011/06/01 10:12:35 [emerg] 9750#0: bind() to 127.0.0.1:80 failed (98: Address
already in use)
My understanding was that this error stems from [::] being inclusive of
127.0.0.1, causing nginx to attempt to bind it twice.
However, replacing the
listen [::1];removes the
error, despite the fact that [::1] is also included within [::].
I think you ran into the issue of linux binding to both ipv6 and ipv4 by
you probably want to use
listen [::] ipv6only=on;