title: Nginx doesn't serve static files
body: <p>I've just deployed my django website on an Ubunto server. But it doesn't load any static file.</p>
  
  <p>settings.py:</p>
  
  <pre><code>STATIC_URL = '/static/'
  STATICFILES_DIRS = [
  os.path.join(BASE_DIR, "static"),]
  STATIC_ROOT = 'staticfiles'
  </code></pre>
  
  <p>nginx/sites-available configuration:</p>
  
  <pre><code>server {
          server_name 138.197.172.33;
  
          access_log off;
  
          location /staticfiles/ {
              root staticfiles;
          }
  
          location / {
              proxy_pass http://127.0.0.1:8001;
              proxy_set_header X-Forwarded-Host $server_name;
              proxy_set_header X-Real-IP $remote_addr;
              add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
          }
      }
  </code></pre>
  
  <p>Errors:</p>
  
  <pre><code>...
  
  [14/May/2018 05:28:28] "GET /static/vendors/underscore/underscore.js 
  HTTP/1.1" 404 113
  [2018-05-14 05:28:29,252] base: WARNING - Not Found: 
  /static/vendors/bootstrap-notify-simple-wrapper/bootstrap-notify- 
  simple-wrapper.min.js
  [14/May/2018 05:28:29] "GET /static/vendors/bootstrap-notify-simple- 
  wrapper/bootstrap-notify-simple-wrapper.min.js HTTP/1.1" 404 159
  [2018-05-14 05:28:29,690] base: WARNING - Not Found: 
  /static/js/custom.js
  [14/May/2018 05:28:29] "GET /static/js/custom.js HTTP/1.1" 404 93
  [2018-05-14 05:28:30,236] base: WARNING - Not Found: 
  /static/js/converter.js
  [14/May/2018 05:28:30] "GET /static/js/converter.js HTTP/1.1" 404 96
  ...
  </code></pre>
  
  <p>staticfiles folder includes:</p>
  
  <pre><code>admin  ajaximage  css  datatable  dm2bn  fonts  images  js  static  
  tinymce  vendors
  </code></pre>