I am trying to "leverage browser caching" in order to increase site speed. The webapp is hosted on pythonanywhere and I guess I need to configure the nginx.conf file to include:
location ~* \.(css|js|gif|jpe?g|png)$ {
expires 168h;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
(from here: how to Leverage browser caching in django)
However I can't find the conf file anywhere. It is not in /etc/nginx, /usr/local/etc /usr/etc ...
Can this be done on pythonanywhere ?
PythonAnywhere dev here. Unfortunately you can't change the nginx settings on our system -- but the system-default settings are actually pretty much what you'd want. If you're using the "Static files" table on the "Web" tab to specify where they are, then: