[Django]-Can't get nginx to serve collected static files

10👍

This question gets asked quite a lot on here…

location /static/ {
    alias /var/www/startupsearch_live/livestatic/;
}

Using root the way you had it would make a request for /static/foo.jpg resolve to /var/www/startupsearch_live/livestatic/static/foo.jpg

alias doesn’t append the location to it. It one-for-one maps it as-is.

👤jdi

Leave a comment