How to exclude directory from password protected directory in Apache
by Artur on Mar.12, 2009, under Sysadmin
I had a problem lately with password protected directory using Apache2 mod_auth. I had to serve one directory inside of password protected directory without any restrictions.
This is how to set it up in Apache2:
<Directory />
Options Indexes FollowSymLinks Includes
AuthType Basic
AuthName "Restricted area"
AuthUserFile /home/artur/.apache_users
require valid-user
AllowOverride AuthConfig
</Directory>
Options Indexes FollowSymLinks Includes
AuthType Basic
AuthName "Restricted area"
AuthUserFile /home/artur/.apache_users
require valid-user
AllowOverride AuthConfig
</Directory>
So now if you want to allow unrestricted access to passfree in root dir of web server just add this:
<Location "/passfree">
Satisfy Any
</Location>
Satisfy Any
</Location>
Simple eh?!