nginx reverse proxy to apache: php doesn't work

view full story

http://serverfault.com – I'm trying to make a reverse proxy from nginx to apache on my Ubuntu 10.04 server. It is working fine right now with HTML files... the requests are sent directly to apache. But whenever I visit a PHP file, I see a nginx 502 bad gateway error. I'm guessing this means that there's a problem with apache's PHP configuration. Here's the message I get from the nginx error log: 2012/01/02 09:48:06 [error] 27834#0: *2445 upstream prematurely closed connection while reading response header from upstream, client: myIP, server: mydomainname, request: "GET /phpsite/ HTTP/1.1", upstream: "http://127.0.0. (HowTos)