[Answered ]-Unable to load my static files in Django production environment

1👍

It’s better to serve the static files through Nginx instead of django.

Do the following steps

  1. Collect static files
    python manage.py collectstatic
    
  2. Update nginx config to serve the static files
    location /static/ {
        root /path/to/staticfiles;
    }
    

It will work like below
Browser [request]--> Nginx [static files]

Leave a comment