[no subject]

Rob Schultz rschultz7 at gmail.com
Wed Jun 1 20:16:34 MSD 2011


> 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 localhost;` with `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 default.
http://wiki.nginx.org/HttpCoreModule#listen
you probably want to use
listen [::] ipv6only=on;

V/r,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110601/0a8587c3/attachment-0001.html>


More information about the nginx mailing list