Apologies if you received a 502 “Bad Gateway” error when trying to visit the site in the last number of days/weeks – for some reason, without any apparent configuration change (although I guess there must’ve been a change in a default config somewhere) the server has decided to start resolving localhost as both 127.0.0.1 *and* ::1. What governs which result is returned, I do not know, but the PHP FPM backend is only listening on the IPV4 address. Consequently, when ::1 gets returned for localhost and Nginx attempts to connect, there is nothing listening on that address and port, hence the error.
I’ve since hard-coded 127.0.0.1 into the necessary config files, and the logs look good so far. Hopefully the number of visitors will stop going down now. ;)