hosts file confuses nginx (IPv4 vs. IPv6)

Michael Herf

Active Member
May 31, 2019
12
2
43
49
I use nginx in a container to log to syslog via "localhost". It recently stopped working entirely, until I changed the config to use "127.0.0.1" instead of "localhost".

When I looked in my /etc/hosts I saw a "PVE" section with IPv6 config. This makes me suspect the problem is a change PVE made to /etc/hosts in the container, because I don't know why else it would have changed.

Currently it has an entry for "::1 localhost" (IPv6 style) appearing below the IPv4 entry. Is this a recent change that may have affected the container?