Welcome! Log In Create A New Profile

Advanced

Re: Setting expires header to multiple locations

Edho Arief
December 14, 2012 06:40AM
On Fri, Dec 14, 2012 at 6:31 PM, howard chen <howachen@gmail.com> wrote:
> 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?
>
>

put in separate file and include it in each blocks?

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Setting expires header to multiple locations

howard chen December 14, 2012 06:32AM

Re: Setting expires header to multiple locations

Edho Arief December 14, 2012 06:40AM

Re: Setting expires header to multiple locations

Antonio P.P. Almeida December 14, 2012 07:00AM

Re: Setting expires header to multiple locations

Igor Sysoev December 14, 2012 07:38AM

Re: Setting expires header to multiple locations

howard chen December 14, 2012 09:44AM

Re: Setting expires header to multiple locations

howard chen December 14, 2012 09:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 42
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready