Location confusion

Igor Clark igor at pokelondon.com
Wed Dec 5 18:20:48 MSK 2007

Hi there Igor et al,

How do I make

	location ~ .php$ {
		// fastcgi stuff

co-operate with

	location ~ /admin/.* {
		// auth_basic stuff

so that anything under /admin/ requires a username & password, but PHP  
still serves the php files?

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!


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.

Get on Board with WWF for a stronger Climate Change Bill

More information about the nginx mailing list