Hans du Plooy wrote: > Hi guys, > > I'm not sure what I'm missing. I migrated some web apps from a SLES9 > box to a Sarge box, and all is fine, except one page that is protected > by a .htaccess file. > > Apache2 simply doesn't see it - nothing in the logs, and no password > prompt. > > Here is the content of the .htaccess: > > AuthUserFile /var/www/mailadmin/admin/.htpasswd > AuthName "Enter Password" > AuthType Basic > Require valid-user > > And in /etc/apache2/apache2.conf, I have: > > AccessFileName .htaccess > > <Files ~ "^\.ht"> > Order allow,deny > Deny from all > </Files> > > > What am I missing? > > Thanks > Hans > > A couple of things: Do you have an "AllowOverride None" directive anywhere in your apache2.conf? If so, you can allow the authentication like so: <Directory /var/www/mailadmin/admin/> AllowOverride AuthConfig </Directory> You can also use "AllowOverride All" if you want to be able to to do other tricks in the .htaccess file without restarting the apache process. Also, if you are not going to be changing this frequently, it is better to simply place the authentication configuration directives directly into the apache2.conf or the virtual host config file. Reading and processing .htaccess files incurs a performance penalty under apache. Regards, -Roberto -- Roberto C. Sanchez http://familiasanchez.net/~roberto
Attachment:
signature.asc
Description: OpenPGP digital signature