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 运筹学排序问题中的在线排序
  • ¥15 关于#flink#的问题:关于docker部署flink集成hadoop的yarn,请教个问题flink启动yarn-session.sh连不上hadoop
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题