title: Django React Nginx serving admin static files
body: <p>I feel a bit awkward asking a question which has been answered before - however I feel there is a point of difference with regard to having node serve out the static files as opposed to django. The css bundled by webpack and served by node is working with no problems, where I'm having issues is serving up the admin css and another couple of other files using the get_static_prefix decorator. </p>
  
  <p>The file structure is as follows: </p>
  
  <pre><code>root
      |
       public
          - templates
          - static
               | &lt;-- collectstatic adding files here
          - vendor
      |
        server
          - app1
          - app2
               | settings.py        
  </code></pre>
  
  <p>/etc/nginx/sites-available/project</p>
  
  <pre><code> server {
       listen xxx.xxx.xxx.xxx:8000;
       server_name xxx.xxx.xxx.xxx;
       location /static {
              alias /root/se/env/public/static/;
      }
  }
  </code></pre>
  
  <p>and the setup in settings.py</p>
  
  <pre><code>STATIC_URL = '/root/se/env/public/static/'
  MEDIA_URL = '/media/'
  STATIC_ONLY_URL = '/static_only/'
  
  if not DEBUG:
      MEDIA = '/media',
      STATIC_ROOT = '/root/se/env/public/static/'
      MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'public', 'media')
      STATICFILES_DIRS = '/root/se/env/public/vendor/static/',
  </code></pre>
  
  <p>I've been going around in circles for a while now. I'm pretty new to Django and don't really get how this works. From what I can understand the the STATICFILES_DIRS are where collectstatic gathers the static files from and the STATIC_ROOT is where the static files are dumped after collectstatic is run. I think the STATIC_URL is where I'm going wrong - but I'm not having much luck figuring it out. </p>
  
  <p>As it stands the admin css isn't working when DEBUG = True now either, so I've misconfigured something. It's resulting in:</p>
  
  <pre><code>Not Found: /static/admin/css/base.css
  </code></pre>