Answer the question
In order to leave comments, you need to log in
How to correctly set the expiration of static files in nginx?
Good afternoon! I specify the expiration date of the statics in the nginx settings and it stops loading at all. Perhaps something is not correctly specified in the Django settings, but without specifying the cache expiration time, everything works fine. What to do?
In the config I write:
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 1w;
log_not_found off;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question