Comment 18 for bug 1743592

Revision history for this message
Simon Déziel (sdeziel) wrote :

Using a single "listen [::]:80 default_server ipv6only=off;" seems to do the right thing in all situations: IPv4-only, IPv6-only or dual-stack.

The drawback of using this single socket is that IPv4 clients have their IPs represented as IPv4-Mapped IPv6 in access_log:

==> /var/log/nginx/access.log <==
::ffff:10.139.167.1 - - [20/Feb/2020:17:15:25 +0000] "GET / HTTP/1.1" 200 612 "-" "Wget/1.19.4 (linux-gnu)"

That said, if you go to extra lengths to disable IPv6 on your box, why not also tune the default vhost? Your config is already not aligned with the default of IPv6 enabled :)