Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

how to create a .htpasswd file?


Recommended Posts

Im now at installation stage entitled:


"Password protect your /admin dir using .htaccess" of the installation instructions.


The instructions state:


Add this code to your .htaccess file:


AuthType Basic

AuthName "Locked Area"

AuthUserFile /home/youraccount/.htpasswds/admin/passwd

require valid-user



I added this txt to the .htaccess file in my catalog directory, as I dont have any other .htaccess file. I assume this is correct.?? -should it be in the admin directory?


I now need to create my .htpasswd file but have no idea how. Ive been to the http://www.kelv.net/programming/htaccess/ web site and generated the code, could anyone advise me what to do next?

Link to comment
Share on other sites

You will need telnet access to your server, although if you run linux on your local machine you could create the htpasswd file locally and upload it.


Either way, either telnet or local, just type


man htpasswd


at a terminal prompt to get full instructions.

Trust me, I'm an Accountant.

Link to comment
Share on other sites


First of all make sure that this path is correct and that it reflects the passwd location. (File path, not virtual path).


Depending on your hosting situation you should put the htpasswd file outside the htdocs area, but you might not have access to locations above your home directory.


When using Kelvs htpasswd maker, simply cut/paste the line containing the username and password, create a file and call it passwd containing the username and password.


If you are unsure about the "file path" use PHP info...


All the best!

Link to comment
Share on other sites

Many hosts have a way to setup password protected directories through their control panel or equivalent administration web page. This avoids needing telnet or any knowledge of .htaccess and .htpasswd files. If your host has this it's the easier route.

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...