2012-04-24 191 views
1

我刚刚从apache2切换到nginx为我的应用程序之一,可能会保持大流量。nginx 502错误的网关错误

我已经安装了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" 

UPDATE:我重新启动服务器,并有一些新的日志味精现在;

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" 

回答

0

你想使用PHP-FPM FastCGI的nginx的。有很多关于如何设置它的文档,这很简单。

+4

谢谢,寻找'有很多医生在那里'有一些,这是有帮助的。 – 2012-04-25 05:10:02