Re: Authenticating with subfolders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux