httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [users@httpd] <Location /> for a whole site BUT one directory
Date Sun, 03 Aug 2008 19:37:38 GMT
André Warnier wrote:
> Ralph Kutschera wrote:
>> Hallo list!
>>   I've been searching the archive but it seems there isn't yet a 
>> solution to this:
>>   I would like to have a whole site to be accessed only by user/passwd:
>> <Location />
>>   AuthXXX [..]
>> </Location>
>>   Only one directory should be accessible without authentication:
>> <Location /public>
>>   Order Allow,Deny
>>   Allow from All
>> </Location>
>>   This does not work. I'm getting asked for user/passwd whenever I try 
>> to access
On second thought..
The answer may be in the Apache doc.  It is well-hidden, but it's there.
section : Removing controls in subdirectories

It looks like by just adding "Satisfy any" in the <Location /public> 
section , it may do the trick.

Try it and tell, I am interested.

By the way, I think that it would be safer to define this via 
<Directory> sections than via <Location>.
For <Location />, it does not matter, because that's going to be the 
same as you document root no matter what.
But, if your server were to be on a host whose file names are 
case-insensitive (like Windows), then a user requesting a URL like 
"/Public/x" would not fall under the conditions that apply to 
"/public/x" (and nevertheless get the document).


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message