tbrooke
tbrooke

Reputation: 2197

502 Bad Gateway error with nginx and unicorn

I have nginx 1.4.1 and unicorn set up on centos - I am getting a 502 Bad Gateway error and my nginx logs shows this:

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"

There is no /tmp/unicorn.pantry.sock file or directory. I am thinking that it might be a permission error and therefore the file can't be written if so who requires what permission - I have also read that I can create a tcp client

Also I don't understand where the 192.168.1.192 comes from

I just want to make it work How can I do it?

Upvotes: 0

Views: 3421

Answers (1)

tbrooke
tbrooke

Reputation: 2197

Ok I figured this out. I had unicorn.sock in my shared directory so I needed to point unix: to it

Upvotes: 1

Related Questions