Nginx 502 Bad Gateway 05.02.12
502 error messages while viewing an php file means nginx is not communicating with php correctly.
Error log :
connect() failed (111: Connection refused) while connecting to upstream
From these line it is clear it is not listening to port 9000. Or its listen queue is full.
Check port 9000 using this command :
netstat -lnp | grep :9000
Check is the process running :
ps auxww | grep php5-cgi