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
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to