I've been working on getting this website up and running under IPv6, and it turned out to be somewhat involved. Firstly, I signed up with Hurricane Electric's tunnelbroker.net, to get IPv6 connectivity, because my ISP doesn't offer it yet. Setup my own DNS servers running nsd, which was a bit of a learning curve, but in the long run I think it'll be better than working with goofy DNS managers like you'd find on registrar or hosting websites. NameCheap is now letting you setup IPv6 glue records right on their website (previously you had to file a support ticket), so that made things easier.
The only big glitch I ran into is that on FreeBSD, using simply
to listen to both IPv4 and IPv6 didn't work. When trying that, I found that any request coming in as IPv4 would give weird 403 or 404 (I don't remember which) errors, where it seemed nginx just didn't know what virtual host to go to. Linux doesn't seem to have that problem. Ended up using separate listen statements, as in:
listen 80 default_server; listen [::]:80 default_server ipv6only=on;
for the main site, but VERY IMPORTANTLY, the remaining sites could not have the
ipv6only=on directive, they just simply say
listen 80; listen [::]:80;
(found that trick in this ServerFault page). This also has the advantage of showing proper IPv4 IP addresses in the logs, instead of IPv4-mapped IPv6 addresses such as
::ffff:18.104.22.168, so I ended up doing the same thing on a Linux box even though it handled dual-stack by default just fine.
I also for testing purposes, made aliases
To force one protocol or the other. When you use http://barryp.org/blog/, it's not obvious which you're using.