 <p>So finally got the system up and running, and for all the people facing similar problems, and without munch knowledge of unicorn or ngixn here are the steps:</p> <p>First make sure both services are running (unicorn is the app server and ngixn is the http server), both services should be configured in /etc/init.d/.</p> <p>Stop both services.</p> <p>Check your policies in selinux, here is a good question on how to do it for the same error in PHP <a href="http://stackoverflow.com/questions/23443398/nginx-error-connect-to-php5-fpm-sock-failed-13-permission-denied">nginx error connect to php5-fpm.sock failed (13: Permission denied)</a>, the idea is to be sure selinux ins't interfering with the rad process of the socket (the socket is created by unicorn and readed by ngixn)</p> <p>then you have to edit your config files unicorn.rb and nginx.conf, both should point to a folder different to tmp for the socket here is why <a href="http://serverfault.com/questions/463993/nginx-unix-domain-socket-error/464025#464025">http://serverfault.com/questions/463993/nginx-unix-domain-socket-error/464025#464025</a></p> <p>So finally my configurations looks like this:</p> <p>Part of nginx config file</p> <pre><code>upstream unicorn { server unix:/home/myuser/apps/myapp/shared/socket/unicorn.camicase.sock fail_timeout=0; } </code></pre> <p>part of unicorn config file</p> <pre><code>listen "/home/deployer/apps/stickystreet/shared/socket/unicorn.camicase.sock" </code></pre> <p>then start unicorn a ngixn, if you get a (13: Permission denied) while connecting to upstream error just do a sudo chmod 775 socket/ changing the socket for whatever folder you put your unicorn socket to be stored, the restart ngixn service.</p>