Setup htpasswd on directory but allow access to index file

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

 



Hello there,

I need to setup htpasswd protection on a web directory served by Apache.

I also need to permit access to the index file in the specified directory, but block access to any other files or subdirectories.

So I'm using a configuration like this:

<Files index.php>
	Order deny,allow
	Allow from all
</Files>

<Directory "/home/username/www">
	AuthType Basic
	AuthName "Private Area"
	AuthUserFile /home/username/.htpasswds
	require user bill ben
</Directory>


Can anybody tell me why my override of the password protection for index.php files is being ignored?

Or alternatively tell me a better approach to password an entire web site except for the root level index file.

Any input appreciated.

Cheers

Ben

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-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