Welcome! Log In Create A New Profile

Advanced

nginx and fastcgi - unable to serve PHP

January 06, 2010 10:49AM
I've been working on this for about two days now, still with no luck, and I'm about out of ideas. Any suggestions would be much appreciated.

I've got a working install of nginx (serves HTML fine), installed php5 and followed the instructions at http://www.allthepages.org/archives/2009/02/how-get-drupal-working-nginx to get php working. I've been using the shell script from http://drupal.org/node/110224 to start php.
[code]
ps ax | grep php
1899 ? Ss 0:00 /usr/bin/php5-cgi -q -b 127.0.0.1:9000
1901 ? S 0:00 /usr/bin/php5-cgi -q -b 127.0.0.1:9000
1902 ? S 0:00 /usr/bin/php5-cgi -q -b 127.0.0.1:9000
1903 ? S 0:00 /usr/bin/php5-cgi -q -b 127.0.0.1:9000
1904 ? S 0:00 /usr/bin/php5-cgi -q -b 127.0.0.1:9000
1905 ? S 0:00 /usr/bin/php5-cgi -q -b 127.0.0.1:9000
1975 pts/1 R+ 0:00 grep --color=auto php
[/code]
(php is running and listening on port 9000)

In my nginx server config, I have:
[code]
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/mysite$fastcgi_script_name;
include /opt/nginx/conf/fastcgi_params;
}
[/code]

However, on loading, I get a page that reads: "The page you are looking for is temporarily unavailable. Please try again later."

nginx's error.log reads:
[code]
2010/01/06 10:34:20 [error] 1936#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.2.4, server: mysite.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.2.16"
[/code]


Everything seems to be set correctly, at least as much as I've read, yet I still can't get it to work. Any idea what I might be doing wrong?

Thank you
Subject Author Posted

nginx and fastcgi - unable to serve PHP

sekatsim January 06, 2010 10:49AM

Re: nginx and fastcgi - unable to serve PHP

Maxim Dounin January 06, 2010 06:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 253
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready