httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincenzo D'Amore" <v.dam...@gmail.com>
Subject Re: [users@httpd] Authenticating with subfolders
Date Tue, 21 May 2013 12:14:44 GMT
Hi Miguel,

when you get authenticated with test1 user, may be your server returns an
html page that have more resources inside (i mean css, js, img), and very
likely, some of them are into the root Realm. This could explain why you
get prompted for the root password too.

Best,
Vincenzo



2013/5/21 Miguel González <miguel_3_gonzalez@yahoo.es>

>
>
>
> On 21/05/2013 12:27, Vincenzo D'Amore wrote:
>
>> Hi Bruno,
>>
>> may be you're right, I read long time ago, but actually don't remember
>> exactly the RFC.
>> So now I have just implemented such configuration with Apache 2.2.
>>
>> Into the document root I have created a .htaccess with this configuration:
>>
>> AuthType Basic
>> AuthName "Root Restricted Files"
>> AuthBasicProvider file
>> AuthUserFile /var/www/.htpasswd
>> require valid-user
>>
>> After I created a directory /var/www/test1 where I have created a new
>> .htaccess file with this configuration:
>>
>> AuthType Basic
>> AuthName "Test1 Restricted Files"
>> AuthBasicProvider file
>> AuthUserFile /var/www/test1/.htpasswd
>> require valid-user
>>
>> Into /var/www/.htpasswd  there is:
>>
>> # htpasswd -bn root password
>>
>> root:UYMXijHR5MW42
>>
>> Into  /var/www/test1/.htpasswd there is:
>>
>> # htpasswd -bn test1 password1
>>
>> test1:P5ENtSmla14FQ
>>
>> Well, it is working pretty well, please try it.
>> I have also tried to add a third directory with different credential,
>> every thinks works like a charm :)
>>
>
> Well, I have Apache 2.2.15. What you have showed in your configs is what I
> have already tried myself and It doesn't work for me.
>
> When I get authenticated with test1 user, I get another prompt for
> entering the root password as well. If I cancel, I get some sort of
> degraded version of the index in the root folder which doesn't make sense
> to me
>
> Regards,
>
> Miguel
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@httpd.**apache.org<users-unsubscribe@httpd.apache.org>
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Vincenzo D'Amore
email: v.damore@gmail.com
skype: free.dev
mobile: +39 349 8513251

Mime
View raw message