502 error caused by connection refused: (upstream fastcgi, etc)
-
Hi.
I’ve been trying to upgrade my server from a single-site to a multi-site (eventually with distinct domains). I followed the directions from the codex:
https://codex.www.ads-software.com/NginxWhich use php5-fpm. I installed fpm, but something is going wrong and it doesn’t seem to be running no matter that I restart it.
The error in /var/log/nginx/error.log is:
2012/06/20 21:28:30 [error] 3391#0: *21 connect() failed (111: Connection refused) while connecting to upstream, client: <my home ip>, server: *.<mysite>.com, request: "GET /tag/pdx/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.<mysite>.com"
My nginx.conf includes:
# Upstream to abstract backend connection(s) for PHP. upstream php { # server unix:/tmp/php-fpm.sock; server 127.0.0.1:9000; }
and my /etc/php5/fpm/pool.d/www.conf includes:
listen = 127.0.0.1:9000 ;listen = /tmp/php-fpm.sock
I have also tried commenting out the port options and uncommenting the socket options and restarting the nginx and php-fpm servers, to the same effect (with the relevant change to the error message.
Now here’s where it get’s funky.
using the command: sudo netstat -tlpn | grep :9000 (found after much googling)
Shows:
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 3454/php-fpm.conf)
Which implies to me that fpm is alive and listening. Any ideas?? I’ve been working on this for a week!!
- The topic ‘502 error caused by connection refused: (upstream fastcgi, etc)’ is closed to new replies.