Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.