Serving static files with Nginx + Gunicorn + Django <p>This is my nginx config:</p> <pre><code> server { listen 80; server_name localhost; keepalive_timeout 5; access_log /home/tunde/django-projects/mumu/nginx/access.log; error_log /home/tunde/django-projects/mumu/nginx/error.log; root /home/tunde/django-projects/mumu; location / { try_files $uri @proxy_to_app; } location @proxy_to_app { 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:8000; } } </code></pre> <p>My settings.py looks like:</p> <pre><code> import os settings_dir = os.path.dirname(__file__) PROJECT_ROOT = os.path.abspath(os.path.dirname(settings_dir)) STATIC_ROOT = '/home/tunde/django-projects/mumu/STATIC/' STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(PROJECT_ROOT, 'static/'), ) </code></pre> <p>My supervisord.conf file looks like:</p> <pre><code>[program: mumu] command = /home/tunde/ENV1/bin/gunicorn -w 1 --bind=127.0.0.1:8000 mumu.wsgi:application directory = /home/tunde/django-projects/mumu/ stdout_logfile= /home/tunde/django-projects/mumu/supervisor/logfile.log stderr_logfile= /home/tunde/django-projects/mumu/supervisor/error.log user = tunde </code></pre> <p>The problem is that static files don't get served and I have no idea what I'm doing wrong. A url like /static/css/styles.css returns a 404. Help will be greatly appreciated.</p>