title: Can't get nginx to serve collected static files
body: <p>I am trying to get nginx to work alongside gunicorn. I have a directory <code>/project/static/</code> where static files are. Those files are collected into a directory <code>/project/livestatic/</code> using the <code>settings.py</code> configuration shown:</p>
  
  <pre><code>STATIC_ROOT = '/project/livestatic'
  STATIC_URL = '/static/'
  STATICFILES_DIRS = (
      '/project/static',
  )
  </code></pre>
  
  <p>I'm using the following nginx config:</p>
  
  <pre><code>worker_processes 1;
  user nobody nogroup;
  pid /tmp/nginx.pid;
  error_log /tmp/nginx.error.log;
  
  events {
      worker_connections 1024;
      accept_mutex off;
  }
  
  http {
      include mime.types;
      default_type application/octet-stream;
      access_log /tmp/nginx.access.log combined;
      sendfile on;
  
      upstream app_server {
          server 127.0.0.1 fail_timeout=0;
      }
  
      server {
          listen 80 default;
          client_max_body_size 4G;
          server_name domain.org;
  
          keepalive_timeout 5;
  
          # path for static files
          location /static/ {
              autoindex on;
              root /var/www/startupsearch_live/livestatic/;
          }
  
          location / {
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header Host $http_host;
              proxy_redirect off;
  
              proxy_pass   http://127.0.0.1:8888;
          }
      }
  }
  </code></pre>
  
  <p>Under the development server (ignoring nginx), this configuration works fine and I can serve static files by linking to them in the format <code>/static/file.extension</code>. However, the moment nginx/gunicorn come into play, this doesn't work, and attempting to access <code>domain.org/static/</code> gives a django 404 page, signifying that nginx straight up isn't serving the files at all. How have I gone wrong?</p>