Welcome! Log In Create A New Profile

Advanced

Re: Declare a block so as to be shared between locations

September 26, 2013 03:26AM
On 26/09/13 19:20, Maurizio De Santis wrote:
> I have two locations, /a and /b . Both of them share these directives
>
> expires max;
> add_header Cache-Control public;
> add_header ETag "";
> break;
>
> and location /b to has gzip_static on too.
>
> Is there a way to write this without writing two times the common
> directives?
> That is, without rewriting the common directives like this:
>
> location /a {
> expires max;
> add_header Cache-Control public;
> add_header ETag "";
> break;
> }
>
> location /b {
> gzip_static on;
> expires max;
> add_header Cache-Control public;
> add_header ETag "";
> break;
> }
>
> Generally speaking, is there a way to declare a block so as to be
> shared between two or more locations without rewriting the common
> directives?
>
> Thank you
>
> --
>
> Maurizio De Santis
>
include them from a remote file?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Declare a block so as to be shared between locations

m.desantis September 26, 2013 03:22AM

Re: Declare a block so as to be shared between locations

GreenGecko September 26, 2013 03:26AM

Re: Declare a block so as to be shared between locations

mex September 26, 2013 04:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready