> 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;
> }
> }
Going against Igor, Maxim, Valentin and Ruslan in order to be more DRY you
could use a regex based location (which has its own quirks):
location ~* ^/(?:a|b|c)/.*\.(?:css|gif|js|jpe?g|png)$ {
expires 1y;
}
--appa
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx