Multiple URL parameters in the same location directive.

Jonathan Matthews contact at
Sun Oct 28 14:37:41 UTC 2012

On 28 October 2012 03:59, Quintin Par <quintinpar at> wrote:
> Hi all,
> I have some URL patterns that follow the same directive specifications.
> Now I have written separate directives for all of these URL patterns.
> How can I combine them into one line?
> Can I do this?
>         location /robots.txt, sitemap.xml, ~*.xml {

Not quite.

You'll need to use a regular expresion in your location, as detailed
at and

I find the wiki documentation on this specific topic to be clearer and
more useful.

Jonathan Matthews // Oxford, London, UK

More information about the nginx mailing list