WebadOnline
07-15-2002, 10:41 PM
I am currently running RedHat Linux 7.1, and I am trying to secure a web directory and the htpasswd command is not working. Does anyone have an idea of why it's not working?
Please let me know..
Thanks,
Michael Barker
Having trouble myself :(
Silly question maybe, but have you checked http://httpd.apache.org/docs/programs/htpasswd.html ?
Lats...
nousername
07-15-2002, 11:48 PM
1) Run /usr/local/apache/bin/htpasswd and create yourself a username/password. This will generate a file called ".htpasswd"
2) Move that file anywhere you like, but make sure it is not web accesible. (outside the "public_html" directory.
3) Create a file named ".htaccess" with the following info in it;
AuthName "My Secret Area"
AuthType Basic
AuthUserFile /path/to/.htpasswd
require valid-user
4) Upload the new .htaccess file into the dir you want to protect and hey presto amigo!
- Anth
nousername, if the password encryption handled at step 1?
Lats...