• The Forums are now open to new registrations, adverts are also being de-tuned.

.htaccess help...

Spinal

MB Enthusiast
Joined
Sep 14, 2004
Messages
4,806
Location
between Uxbridge and the Alps
Car
x254, G350, Duster, S320, Mach1, 900ss and a few more
I need to secure a directory... nothing too private, but I would like a simple password...

So I'm using the .htaccess support in Apache, but am having some issues...

this is my .htaccess file (permissions 0600)
Code:
AuthType Digest
AuthName "Private"
AuthDigestFile "/home/root/.htpasswds/public_html/website1/private/passwd"
require valid-user

and I've created a password file using htdigest:

passwd(0700)
Code:
Spinal:Private:aaaaaaaaaa3b66dd54f253aaaaaaaaaa

Needless to say, I've edited the hash to get a bit of privacy :)

Any ideas what my issue is? When going to that directory I get an error 500 (internal server error...)

M.
 
A while since I've looked at .htaccess stuff, but:

1) Try to get Basic authentication going first (some browsers have issues with Digest - IE in particular IIRC).
2) Put the password file in the same directory so you don't need the full path.

AuthUserFile ".htpasswd"
 
Basic works... I tried that first to see if it was an issue whereby it couldn't read the file...

I THINK (emphasis on think) that it may be related to the htdigest not being installed on the server... actually, I'm fairly convinced it's this...

Let's see if I can convince the friendly people at hostmonster to install it - they usually are quite good!

Or does apache not need that specific utility? (I'm really not sure, I'm playing with this as I want something really simple... I may just stick with basic... after all, it's just gives me access to the blog for the site... )

M
 
Last edited:
Just had a google - looks like IE7 fixed the imcompatability between Apache Digest and IE.

But yes if mod_auth_digest isn't loaded - you might have a problem :D
 

Users who are viewing this thread

Back
Top Bottom