title: CentOS 6.4 + Nginx + uwsgi + (13: Permission denied) while connecting to upstream
body: <p>As mentioned in the title, I'm experiencing a permission denied error in my nginx + uwsgi setup in my CentOS 6.4. I'm running uwsgi as root already. Below are my configuration files. Take note that I've already linked (ln -s) the mysite_nginx.conf to /etc/nginx/sites-enabled/. Also I've already changed the owner of /home/user1/location/mysite to nginx user.</p>
  
  <p>mysite_uwsgi.ini</p>
  
  <pre><code>#mysite_uwsgi.ini file
  [uwsgi]
  
  # Django-related settings
  # the base directory (full path)
  chdir           = /home/user1/location/mysite/myapp
  # Django wsgi file
  module          = mysite.wsgi
  # the virtualenv (full path)
  home            = /home/user1/location/mysite
  
  # process-related settings
  # master
  master          = true
  # maximum number of worker processes
  processes       = 4
  # the socket (use the full path to be safe
  socket          = /home/user1/location/mysite/myapp/myapp.sock
  # ... with appropriate permissions - may be needed
  chmod-socket    = 666
  chown-socket    = nginx:nginx
  # clear environment on exit
  vacuum          = true
  
  # other config options
  uid = nginx
  gid = nginx
  processes = 4
  </code></pre>
  
  <p>mysite_nginx.conf</p>
  
  <pre><code># mysite_nginx.conf
  
  # the upstream component nginx needs to connect to
  upstream mysite {
   server unix:///home/user1/location/mysite/myapp/myapp.sock; se this first)
  }
  
  # configuration of the server
  server {
    # the port your site will be served on
    listen      8082;
    # the domain name it will serve for
    server_name 192.168.X.X; # 
    charset     utf-8;
  
    # max upload size
    client_max_body_size 75M;   # adjust to taste
  
    # Django media
    location /media  {
      alias /home/user1/location/mysite/media;  
    }
  
    location /static {
      alias /home/user1/location/mysite/static; 
    }
  </code></pre>
  
  <p>I already followed the answers related to the same issue here in stackoverflow but none of them help. What am I lacking? doing wrong?</p>
  
  <p>Thanks in advance!</p>