title: Nginx cannot find unix socket file with Unicorn
body: <p>I already checked the app, and everything seams to be fine (code and app config wise), also the server, database are ok, in the logs I got to this error, I already looked at this <a href="https://stackoverflow.com/questions/22272943/nginx-cannot-find-unix-socket-file-with-unicorn-no-such-file-or-directory/22277617#22277617">Nginx cannot find unix socket file with Unicorn (no such file or directory)</a> but I truly don't even know where to start in order to achieve "Simply modify the listen variable in your Unicorn config file. Ex: listen "/var/sockets/unicorn.[app name].sock", then configure Nginx to proxy all connections to your server to that socket file such as server unix:/var/sockets/unicorn.[app name].sock fail_timeout=0;" if someone could please point me at some directions on how to do this it would be great.</p>
  
  <p>I changed the files, but stuck in the same error, my config files are (I have deleted parts of the files for confidentiality reasons):</p>
  
  <pre><code>root = ""
  working_directory root
  pid "#{root}/tmp/pids/unicorn.pid"
  stderr_path "#{root}/log/unicorn.log"
  stdout_path "#{root}/log/unicorn.log"
  
  listen "/var/sockets/unicorn.camicase.sock"
  worker_processes 2
  timeout 30
  </code></pre>
  
  <p>and the nginx config</p>
  
  <pre><code>upstream unicorn {
    server unix:/var/sockets/unicorn.camicase.sock fail_timeout=0;
  }
  
  server {
     listen         80;
     server_name    _;
     rewrite        ^ https://$host$request_uri? permanent;
  }
  
  server {
    listen 443;
    server_name 
    root 
  
    ssl on;
    ssl_certificate         
    ssl_certificate_key     
  
    ssl_session_timeout  5m;
  
    ssl_protocols  SSLv2 SSLv3 TLSv1;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers  on;
  
    location ^~ /assets/ {
      gzip_static on;
      expires max;
      add_header Cache-Control public;
    }
  
    try_files $uri/index.html $uri @unicorn;
    location @unicorn {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto https;
      proxy_set_header Host $http_host;
      proxy_redirect off;
      proxy_pass http://unicorn;
    }
  
    error_page 500 502 503 504 /500.html;
    client_max_body_size 4G;
    keepalive_timeout 10;
  }
  </code></pre>