duanhui9840 2012-04-24 11:01
浏览 65
已采纳

nginx 502坏网关错误[关闭]

I just switched from apache2 to nginx for one of my application that might hold a large traffic.

I have installed php-fastcgi, and earlier a test page with phpinfo(); function worked properly. I have a small piece of snapshot as well.

phpinfo snapshot

I can't figure out how to make it work!

Here is what my nginx error logs says:

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 : I rebooted the server and there is some new log msg right now;

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条回答 默认 最新

  • douyong1974 2012-04-24 13:58
    关注

    You want to use php-fpm not fastcgi with nginx. There's lots of doc out there on how to set it up, it's pretty simple.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程