Nginx getting Permission denied when connecting to Unicorn

前端 未结 3 1477
旧巷少年郎
旧巷少年郎 2021-01-20 03:24

I have tried many suggestions online but nothing has worked. I have unicorn and nginx working to deploy a ruby on rails app on a CentOS 6.5 server. It has worked before b

3条回答
  •  悲哀的现实
    2021-01-20 03:37

    I had this problem recently. Unicorn was being executed correctly and its error's log was fine. Nginx's error log was showing "failed 13: Permission denied" messages. As many other users, I checked the permissions of the unicorn.sock file and they were correct.

    The problem was that not only the unicorn.sock file needs the correct permissions; also the whole path to the unicorn file needs to have readable permissions.

    chmod o+r
    

    After changing the permissions on those folders, the magic happened.

提交回复
热议问题