2012-04-24 230 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