I’m on Ubuntu 16.04.6 LTS and I’m attempting to upgrade my WP sites to PHP 7 (currently PHP 5.6).
PHP 7 appears to be running:
root@XXXX:~# ee stack status nginx : Running php5.6-fpm: Running php7.0-fpm: Running mysql : Running postfix : Running
But if I either create a new site or attempt to update an existing one to PHP 7 I just get a 502 Bad Gateway error and the following in my error.log:
2019/09/12 10:24:10 [error] 15211#0: *39155 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.xx, server: site.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9170", host: "site.com".
If I switch off PHP 7 the sites load as expected.
I’ve been through all my nginx conf files (though there are a lot so I might have missed something) and can’t seem to find anything that needs changing.
Any ideas anyone?