502 nginx和unicorn的错误网关错误

时间:2013-06-11 03:03:06

标签: nginx unicorn

我有nginx 1.4.1和unicorn在centos上设置 - 我收到502 Bad Gateway错误,我的nginx日志显示:

1 connect() to unix:/tmp/unicorn.pantry.sock failed (2: No such file or directory)
while connecting to upstream, client: 192.168.1.192, server: , request: "GET / HTTP/1.1", 
upstream: "http://unix:/tmp/unicorn.pantry.sock:/", host: "192.168.1.30"

没有/tmp/unicorn.pantry.sock文件或目录。我认为它可能是一个权限错误,因此如果是这样的话,那么文件就不能写了 - 我还知道我可以创建一个tcp客户端

另外,我不明白192.168.1.192来自哪里

我只想让它发挥作用我该怎么做?

1 个答案:

答案 0 :(得分:1)

好的,我想出来了。我的共享目录中有unicorn.sock所以我需要指向unix:to it