More Questions Than Answers

Dan Atrill's blog site

More .htaccess

So today it’s the turn of htaccess. I thought I had this worked out with password protecting directories but there’s a number of ways of achieving the result. Using htpasswd to create a password file and adding users is one method. Using the “Protected Web Directories” module in Webmin is another. Something I’ve noticed with this method though is that using the default option for the password file can result in lots of htpasswd files appearing in the same directory as the htaccess file. Referring to one central point seems to make more sense.
In placing the .htaccess file in the directory to be protected, using a directive which refers to the password file, something like this:
AuthUserFile /usr/local/apache2/bin/user.pass
AuthType Basic
AuthName “Protected PHP Message Board”
require valid-user

It works in some places and in others (internally) it doesn’t protect the directory. The closest I got to fixing it was this tutorial at Vortexmind
It will work, I’m sured. In the meantime try this useful search for “htaccess” at www.digg.com

Mon, March 20 2006 » Apache

Leave a Reply

*