502 Bad Gateway

dyna sbobkin at gmail.com
Wed Aug 22 05:51:17 MSD 2007


I seem to be having an issue which I can't track down on my own. I recently
installed nginx on a xubuntu server. And it's using FastCGI to server PHP.
However I get 502 Bad Gateway errors currently, instead of it working. 

It's really odd, because it is an identical configuration to a server that does
work, or at least I think it's identical. I'm including the info below, any help
would be great

2007/08/21 21:23:08 [error] 5792#0: *9 recv() failed (104: Connection reset by
peer) while reading response header from upstream, client:, server:
my.domain.com, URL: "/index.php", upstream: "fastcgi://", host:

---nginx config
location ~ .*\.php$ { 
  include conf/fcgi.conf;       
  fastcgi_index index.php;
  fastcgi_param SCRIPT_FILENAME /var/www/my.domain.com$fastcgi_script_name;    

I spawn my FastCGI instances using a script, but they do appear to be running:
dummy      5854  0.0  0.8  13876  4304 ? Ss   21:23   0:00 
/usr/bin/php5-cgi -q -b
dummy      5855  0.0  0.3  13888  1836 ? S    21:23   0:00 
/usr/bin/php5-cgi -q -b
And finally 
 php5-cgi -v
PHP 5.2.3-1ubuntu4 (cgi-fcgi) (built: Aug 10 2007 09:14:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Thanks again for any input.

More information about the nginx mailing list