merge two location site to 1 location

António P. P. Almeida appa at
Fri Jan 7 17:10:05 MSK 2011

On 7 Jan 2011 14h00 WET, nginx-forum at wrote:

> Now i'll write two sections of location as follow: location =/aaa{}
> location =/BBB{} But I want to write the two sections to one
> location?  eg. location =/[aaa,BBB]{} , but it's wrong, and does
> someone know how to write it?  Thanks in advance.

Yes but *without* exact matching like you have. AFAIK you need a

location ~* ^/(?:aaa|BBB)$ {
--- appa

More information about the nginx mailing list