nginx 502错误的网关错误

时间:2012-04-24 11:01:06

标签: php ubuntu nginx

我刚刚从apache2切换到nginx,因为我的应用程序可能会占用大量流量。

我已经安装了php-fastcgi,之前有phpinfo();功能的测试页面正常工作。我也有一小段快照。

phpinfo snapshot

我无法弄清楚如何让它发挥作用!

以下是我的nginx错误日志所说的内容:

2012/04/24 16:21:18 [error] 5951#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.1.6, server: 192.168.1.4, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.4:81"
2012/04/24 16:21:19 [error] 5951#0: *1 open() "/home/hitesh/brainlab/favicon.ico" failed (2: No such file or directory), client: 192.168.1.6, server: 192.168.1.4, request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.4:81"

更新:我重新启动了服务器,现在有一些新的日志消息;

2012/04/24 16:31:53 [error] 765#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.4, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.4:81"
2012/04/24 16:31:54 [error] 765#0: *3 open() "/home/hitesh/brainlab/favicon.ico" failed (2: No such file or directory), client: 192.168.1.6, server: 192.168.1.4, request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.4:81"

1 个答案:

答案 0 :(得分:0)

你想用nginx使用php-fpm 而不是 fastcgi。有很多关于如何设置它的文档,它非常简单。