I'm trying to cache .css e .js files.
At the moment in this way is not working:
location /static {
alias /var/www/ttch/assets/;
}
location ~* ^.+\.(css|js)$ {
access_log off;
expires max;
}
With only this config, nginx serve correctly static file without cache:
location /static {
alias /var/www/ttch/assets/;
}
Any hints about how can I merge this two directives? Thanks.