nginx在DigitalOcean上返回“Bad gateway - 502”

时间:2014-06-03 10:04:34

标签: ruby-on-rails ruby unix nginx unicorn

我正在尝试在DigitalOcean上为rails应用配置nginx。当我打开我的IP时,我看到了BAD GATEWAY(502)消息。

在日志中

2014/06/03 09:58:57 [crit] 28612#0: *1 connect() to unix:/tmp/unicorn.myproject-staging.sock failed (2: No such file or directory) while connecting to upstream, client: 81.161.64.26, server: , request: "GET / HTTP/1.1", upstream: "http://unix:/tmp/unicorn.myproject-staging.sock:/500.html", host: "my_ip"

错误消息的含义是什么以及如何解决?

谢谢

修改

应用程序部署在此处:

/home/deployer/apps/myproject-staging

1 个答案:

答案 0 :(得分:0)

请检查以确保您的Unicorn正在运行,并且unix套接字文件的路径是正确的。