.htpasswd location?

I am trying to secure a private directory by placing my .htpasswd file and .htgroup file in my username directory and not in my domain name directory. I have my .htaccess file, below, in my private directory as this:

AuthUserFile /home/myusername/.htpasswd
AuthGroupFile /home/myusername/.htgroup
AuthName Member_Area
AuthType Basic

require group user-list

I FTP’d my .htpasswd and .htgroup files up to the same page where my domain directory is listed along with the Maildir and logs.

I keep getting error messages. I had it working fine when when the passwords were in my domain directory. What am I doing wrong?

Any suggestion would be greatly appreciated.


Life is what happens while we are regretting the past and worrying about the future!

It looks correct to me. I’m wondering:

  1. What error messages are you getting (did you check your error logs?)

  2. Do you have extra user security set (who owns your “username” directory)?

  3. What are your permissions on the .htpasswd and .htgroup files?


You could use the easier panel way, recently mentioned:


Your new favorite site

Edit: Sorry, read too quick, using non-standard locations…

Well Well…All I did was delete the files on my website and delete all files on my computer and create new ones from scratch and upload them again and WahLah…it worked. Go Figure!

Anyway I want to thank you, rlparker, for all your helpful information on one of the previous posts. Your step by step tutorial on “how to password protect with .htaccess” was the one I followed.

My hat is off to ya pardner.


Life is what happens while we are regretting the past and worrying about the future!

Black-Magic, voodoo indeed! It sounds like your stuff might have actually been working and you were experiencing behavior caused by caching.

Whatever the reason it wasn’t working at first, at the end of the day, it’s hard to quibble with success, and I’m really glad you got it working. Thank you for your kind words re. the earlier post; I’m glad you found it helpful. :wink: