You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by larry hamel <ap...@codeguild.com> on 2003/03/10 21:32:55 UTC

[users@httpd] basic auth subdirectories?

hi,

If you use basic authentication, does that mean all subdirectories must also have that authentication?  In particular, can an inner directory have no restrictions, even though it is nested within an outer directory which has Authtype basic restrictions?

The outer directory has

<directory ...>
AllowOverride
AuthType Basic
AuthName blah
AuthUserFile /home/httpd/auth/blah
require valid-user
</directory>

for the inner directory, I tried

<directory ...>
order allow,deny
Satisfy any
allow from all
</directory>

but it doesn't work.  The password challenge comes up.

Is there anything I can do besides rearranging directories?

I'm using Apache server version 1.322 on redhat 6.2

thanks,

larry



---------------------------------------------------------------------
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


Re: [users@httpd] basic auth subdirectories?

Posted by larry hamel <ap...@codeguild.com>.
Thanks very much for the reply, Joshua.  

Perhaps it is something I'm doing wrong, outside of your suggestions.  Indeed I was testing the directory URL rather than the nested-dir/index.html, but I've changed that, and changed the nested directory to have

Satisfy any
order deny,allow
allow from all

but my symptoms are the same--password challenge on nested dir.  

Experimenting with the parent directory, I added "Satisfy any" at the end of the basic-auth directives, but that removed all password challenges everywhere.

Anyway, it is just a curiosity now because I've changed the directory structure to work around this issue.

Again, I really appreciate your reply, Joshua.  This mailing list is so busy!  The number of questions seems daunting.  I occasionally answer questions regarding an open-source Java framework (expresso), and I thought WE got a lot of questions :-)

larry

At 12:42 PM 3/10/2003, you wrote:

>On Mon, 10 Mar 2003, larry hamel wrote:
>> for the inner directory, I tried
>>
>> <directory ...>
>> order allow,deny
>> Satisfy any
>> allow from all
>> </directory>
>>
>> but it doesn't work.  The password challenge comes up.
>>
>
>This configuration works for many other people.
>
>Try
>Order Deny,Allow
>
>to make sure the "allow from all" is evaluated last.
>
>Otherwise, make sure you are actually accessing a file inside the
>subdirectory to test, and not just trying the directory name.
>
>Joshua.
>
>---------------------------------------------------------------------
>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


---------------------------------------------------------------------
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


Re: [users@httpd] basic auth subdirectories?

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 10 Mar 2003, larry hamel wrote:
> for the inner directory, I tried
>
> <directory ...>
> order allow,deny
> Satisfy any
> allow from all
> </directory>
>
> but it doesn't work.  The password challenge comes up.
>

This configuration works for many other people.

Try
Order Deny,Allow

to make sure the "allow from all" is evaluated last.

Otherwise, make sure you are actually accessing a file inside the
subdirectory to test, and not just trying the directory name.

Joshua.

---------------------------------------------------------------------
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