Perlaccess : Tutorials
Setting up Files (8.3)
by Jacob A. Wheeler
http://www.bigresources.com

In order to setup htaccess properly, you will need to create two files. A file named ".htaccess" and ".htpasswd".

.htaccess - This file contains information on where the password file is located, and extra variables you want to define for your login prompt (name etc...).

.htpasswd - All of your usernames and passwords (encrypted) are stored in this file. Using the following format: username:encrypted_pass

Below are two example files, with some more information about each variable. We have also included a online password encrypter, to allow you to encrypt your passwords quickly and easily (vs. logging into a shell and doing it by hand - a little more complicated).

(.htaccess file - can create in notepad, or dos 'edit' - example file)
1. AuthName "You Are Entering A Password Protected Area"
2. AuthType Basic
3. AuthUserFile /path/to/your/.htpasswd
4. require valid-user


(.htpasswd file - can create in notepad, or dos 'edit')
1. username:encrypted_password
2. username:encrypted_password


Why do both files begin with a ".h"?

Apache has been setup (by default) to protect/hide files that begin with a ".h".(this is configured in your httpd.conf apache config file). Unless you are certain you have changed this default variable in apache, you shouldn't have anything to worry about.

Adding Users

<< Back