Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Setting expires header to multiple locations (5 replies)

$
0
0
Currently I need to use tricks since I have multiple locations in my site
config.

e.g.

=====================================


location ~* /a {
location ~* ^/.*\.(?:css|js|jpg|jpeg|gif|png)$ {
expires 1y;
}
}

location ~* /b {
location ~* ^/.*\.(?:css|js|jpg|jpeg|gif|png)$ {
expires 1y;
}
}

location ~* /c {
location ~* ^/.*\.(?:css|js|jpg|jpeg|gif|png)$ {
expires 1y;
}
}


=====================================

Are there any better way to write it?


Thanks.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>