httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Location and sublocation?
Date Thu, 25 Nov 2010 15:00:15 GMT
On Thu, Nov 25, 2010 at 2:39 PM, Jakov Sosic <jakov.sosic@srce.hr> wrote:
> Hi.
>
> I have a following config:
>
> <Location />
>   Order allow,deny
>   Allow from all
>   AuthType basic
>   AuthName "Password Required"
>   AuthUserFile /etc/httpd/htpasswd
>   Require valid-user
> </Location>
>
> Now, I want to allow access to location /somethingelse. Is that possible
> somehow? For example, tu put this in configuration:
>
> <Location /somethingelse>
>   Allow from all
> </Location>
>
> This does not work. It seems that locations cannot be chained like
> directories. So can I achieve this somehow?
>
> Problem that I have is: i must defend location "/" with authentication,
> and for authentication I use mod_auth_memcookie with local PHP files
> which must be accessible by world if I want the authentication to
> work... So chicken and egg problem - if I don't defend /, I can access
> /somethingelse and authorize, if I defend /, I cannot access
> /somethingelse and because of that I cannot authenticate :(
>
>
> Apache 2.2 on CentOS 5.5
>
>

This is covered in the docs:

http://httpd.apache.org/docs/2.2/mod/core.html#require

gives this exact case as an example (you're missing a 'Satisfy Any' in
the 2nd block).

Cheers

Tom

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message