Location confusion

Igor Clark igor at pokelondon.com
Wed Dec 5 21:25:31 MSK 2007


Cool, thanks Igor.

On 5 Dec 2007, at 17:14, Manlio Perillo wrote:

> Alexander Staubo ha scritto:
>> On 12/5/07, Igor Sysoev <is at rambler-co.ru> wrote:
>>> On Wed, Dec 05, 2007 at 03:20:48PM +0000, Igor Clark wrote:
>>>> At the moment the "~ .php$" block seems to be taking precedence,
>>>> meaning that e.g. /admin/index.php is served without a username &
>>>> password, which is not what I intend. I've tried various  
>>>> combinations
>>>> but none have done exactly what I want; I'm sure it's simple!
>>>    location ~ \.php$ {
>>>        # fastcgi stuff
>>>    }
>>>
>>>    location ^~ /admin/ {
>>>        # auth_basic stuff
>>>
>>>        location ~ \.php$ {
>>>            # fastcgi stuff
>>>        }
>>>    }
>> This has bugged me, too. It results in unnecessary config  
>> duplication.
>
> You can always use the include directive.
>
>
>
> Manlio Perillo
>

--
Igor Clark // POKE // 10 Redchurch Street // E2 7DD // +44 (0)20 7749  
5355 // www.pokelondon.com

--
We like good things. So we made some for Orange.
http://www.goodthingsshouldneverend.co.uk/

--
Get on Board with WWF for a stronger Climate Change Bill
http://getonboard.wwf.org.uk/








More information about the nginx mailing list