I upgraded and now I can't use my nginx's proxy_pass
arguments on my Ubuntu server to work with PHP. I keep getting 502 Bad Gateway
errors. Why is this, and how do I fix this?
According to this LaunchPad Bug and this Debian bug, it was requested that Debian/Ubuntu have php5-fpm
listen on a UNIX socket by default. This was adopted in 5.4.0-rc1
, and remains in place in the Ubuntu Quantal (and likely later) packages (this was a package-only change, not an upstream one).
The solution (as outlined in my blog post on this matter) is to change where your proxy_pass
points to, so that it points to unix:/var/run/php5-fpm.sock
which is now the default location for php5-fpm
to set its listener to (this apples to php5
package versions 5.4.0-rc1
and later in both Ubuntu and Debian at the time of this post, and only to the versions in the main repositories, and not PPAs).
This applies to Ubuntu 12.10 (Quantal Quetzal) and later!