nginx – nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

[::]:80 is a ipv6 address.

This error can be caused if you have a nginx configuration that is listening on port 80 and also on port [::]:80.

I had the following in my default sites-available file:

listen 80;
listen [::]:80 default_server;

You can fix this by adding ipv6only=on to the [::]:80 like this:

listen 80;
listen [::]:80 ipv6only=on default_server;

For more information, see:

http://forum.linode.com/viewtopic.php?t=8580

http://wiki.nginx.org/HttpCoreModule#listen

Leave a Comment