配置nginx + php(fastcgi)过程碰到一个问题,折腾一天了,求各位高手帮忙解决,万分感谢!
配置之后,不能打开PHP页面,页面中提示如下:
The page you arelooking for is temporarily unavailable.
Please try again later.首先fastcgi启动成功
[root@localhost bin]# spawn-fcgi -a127.0.0.1 -p 9000 -u www -g www -f /usr/loca l/php/bin/php-cgi
spawn-fcgi: child spawned successfully:PID: 3472这是我的nginx文件中的fastcgi相关配置:nginx.conf
# pass the PHP scripts to FastCGI serverlistening on 127.0.0.1:9000location ~ \.php$ {root html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME /home/www/$fastcgi_script_name;include fastcgi_params;
}
nginx错误日志:
2009/08/20 14:29:48 [error] 6263#0: *4connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /test.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:"127.0.0.1"
2009/08/20 14:52:54 [error] 3502#0: *1connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /test.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:"127.0.0.1"
2009/08/20 14:52:55 [error] 3502#0: *1open() "/home/www/favicon.ico" failed (2: No such file or directory),client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1",host: "127.0.0.1"
2009/08/20 14:52:57 [error] 3502#0: *1connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /test.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:"127.0.0.1"
2009/08/20 14:53:55 [error] 3502#0: *1connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /test.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"
2009/08/20 14:57:38 [error] 3502#0: *5connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /index.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"
2009/08/20 18:13:00 [error] 3502#0: *7connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /index.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:"127.0.0.1"
2009/08/20 18:13:02 [error] 3502#0: *7connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /index.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"拜托了,各位xdjm
配置之后,不能打开PHP页面,页面中提示如下:
The page you arelooking for is temporarily unavailable.
Please try again later.首先fastcgi启动成功
[root@localhost bin]# spawn-fcgi -a127.0.0.1 -p 9000 -u www -g www -f /usr/loca l/php/bin/php-cgi
spawn-fcgi: child spawned successfully:PID: 3472这是我的nginx文件中的fastcgi相关配置:nginx.conf
# pass the PHP scripts to FastCGI serverlistening on 127.0.0.1:9000location ~ \.php$ {root html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME /home/www/$fastcgi_script_name;include fastcgi_params;
}
nginx错误日志:
2009/08/20 14:29:48 [error] 6263#0: *4connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /test.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:"127.0.0.1"
2009/08/20 14:52:54 [error] 3502#0: *1connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /test.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:"127.0.0.1"
2009/08/20 14:52:55 [error] 3502#0: *1open() "/home/www/favicon.ico" failed (2: No such file or directory),client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1",host: "127.0.0.1"
2009/08/20 14:52:57 [error] 3502#0: *1connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /test.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:"127.0.0.1"
2009/08/20 14:53:55 [error] 3502#0: *1connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /test.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"
2009/08/20 14:57:38 [error] 3502#0: *5connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /index.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"
2009/08/20 18:13:00 [error] 3502#0: *7connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /index.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:"127.0.0.1"
2009/08/20 18:13:02 [error] 3502#0: *7connect() failed (111: Connection refused) while connecting to upstream,client: 127.0.0.1, server: localhost, request: "GET /index.phpHTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"拜托了,各位xdjm
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货