Introduction
Account Policies
Problem Solving
Instructor Help
General help by subject
Hypertext and the web
Remote access
Contact NWE Help
Main help page
NWE Help: Web: Authoring: Apache: Step by Step Password Protecting Guide
NWE Home :: Help :: Web :: Authoring :: Apache
Note: Apache and htaccess/htpasswd provide only a cursory level of privacy. Anything you wish to keep 100% private should NOT be placed in your web directory. Configuring htaccess/htpasswd to usernames and passwords which match valid NWE usernames and passwords is strictly prohibited.
- Create a .htaccess file by opening a text editor (ASWE, Emacs,
Pico) and adding these lines:
AuthType Basic
AuthName "MY PASSWORD PROTECTED STUFF"
AuthUserFile /PATH/TO/DIRECTORY/.htpasswd
require valid-user - Change line 3 above to the path to the directory you want to
protect. Saving the password in a non-public directory is also a good idea,
so the line should be something like:
AuthUserFile /home/english/username/.htpasswd - Save this file with the name .htaccess and save it into the
directory you want to protect (which is test in this example).
- Enable the password by going to the command line, changing into
the directory you're protecting (test is the example here), and
typing:
htpasswd -cb .htpasswd USERNAME PASSWORD
With USERNAME and PASSWORD as the actual username and password you want to use. Remember to not use real usernames or passwords. - Test your password protection to see if it works. If it doesn't, then read through the rest of these help pages or contact us.
