1

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

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

phpinfo 快照

我不知道如何使它工作!

这是我的 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"
4

1 回答 1

0

您想在 nginx 中使用 php-fpm而不是fastcgi。那里有很多关于如何设置的文档,这很简单。

于 2012-04-24T13:58:49.297 回答