<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">When running two vhosts, one of which listens on [::], the other on localhost, nginx will fail with this error:<br>2011/06/01 10:12:35 [emerg] 9750#0: bind() to 127.0.0.1:80 failed (98: Address already in use)<br>My understanding was that this error stems from [::] being inclusive of 127.0.0.1, causing nginx to attempt to bind it twice.<br>However, replacing the `listen localhost;` with `listen [::1];` removes the error, despite the fact that [::1] is also included within [::].<span class="Apple-converted-space">&nbsp;</span></span></blockquote></div><br><div>I think you ran into the issue of linux binding to both ipv6 and ipv4 by default.</div><div><a href="http://wiki.nginx.org/HttpCoreModule#listen">http://wiki.nginx.org/HttpCoreModule#listen</a></div><div>you probably want to use</div><div>listen [::]&nbsp;ipv6only=on;</div><div><br></div><div>V/r,</div><div>Rob</div></body></html>