Enable IPv6 in Nginx

Written by
Date: 2011-08-26 17:10:00 00:00


Two months ago we celebreated the IPv6 day, and now that we know that IPv4 addresses are exhausted, we need to start using IPv6, some datacenters like linode are already offering IPv6 native support.

If you are running your website over Nginx, enable IPv6 support is quite easy.

Just open nginx.conf file with your favorite text editor and look for this line:

listen 80;

Or something like that, and replace it with:

listen [::]:80;

You are done, just restart Nginx and you have support for IPv6, provided that you already have an IPv6 address assigned to your server.