A little syntax help, please

John Moore grails at jmsd.co.uk
Sat Nov 22 16:52:50 MSK 2008


Almir Karic wrote:
> what you want are regex locations, see
> http://wiki.codemongers.com/NginxHttpCoreModule#location
>
> On Fri, Nov 21, 2008 at 07:04:45PM +0000, John Moore wrote:
>   
>> Can someone point out to me, please, how I can group a bunch of pages in  
>> a location block, so they all get the same treatment? Let's say I have  
>> '/somePage.htm', '/anotherPage.htm', and '/yetAnotherPage.htm'. I  
>> thought the following would work, but it doesn't. Am I close? TIA
>>
>>
>>        location /(somePage|anotherPage|yetAnotherPage).htm) {
>>            include /etc/nginx/admin.conf;
>>        }
>>
>>
>>     
>
>   

Hmm, that was actually my attempt at using a regex location. I amended 
it to the following, still without luck:

	location ~/(somePage|anotherPage|yetAnotherPage).htm)${
           include /etc/nginx/admin.conf;
       }

I'm hoping someone can point out the error of my ways.







More information about the nginx mailing list