502 Bad Gateway when setting up Email


#1

Hello,

I followed your tutorial here

the problem is when I try to access my site vma.example.com it’s always shows 502 bad gateway error. Here’s the error log:

2014/04/04 04:11:09 [error] 6926#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 121.54.44.134, server: vma.example.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “vma.example.com


#2

We mostly used php5-fpm to listen on 127.0.0.1:9000

In your vma.example.com you need to change the following line fastcgi_pass 127.0.0.1:9000; to fastcgi_pass unix:/run/php5-fpm.sock;


#3

Thanks it worked! :)


#4