Is there any way to tell Apache2 to prompt for username and password when it sees a .htaccess file in a directory? At the moment, I need to define the directory in the following fashion in Apache2 conf file but it becomes a problem as I have thousands of directories that needs .htaccess file password protection. For example, assuming /website is DirectoryRoot then protect /website/a1, /website/b2 etc. <Directory "/website/dir"> AllowOverride All Options Indexes Order allow,deny Allow from all AuthUserFile /website/dir/.htaccess </Directory> Here is my .htaccess file AuthName "Restricted" AuthType Basic AuthLDAPURL ldap://ad.company.com:389/ou=marketing,dc=company,dc=com?sAMAccountName?sub AuthBasicProvider ldap AuthzLDAPAuthoritative off require valid-user In /etc/apache2/default-server.conf, I have changed DocumentRoot "/srv/www/htdocs" <Directory "/srv/www/htdocs/"> Options None AllowOverride None Order allow,deny Allow from all </Directory> to DocumentRoot "/website" <Directory "/website/"> Options None AllowOverride All Order allow,deny Allow from all </Directory> but it don't seem to work. Thanks for any help. --------------------------------------------------------------------- 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