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
Nginx, Fastcgi, PHP, rewrite config for Drupal | Drupal.org to start php.
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
(php is running and listening on port 9000)
In my nginx server config, I have:
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;
}
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:
2010/01/06 10:34:20 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”
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
Posted at Nginx Forum: