setting passwords with apache
I have been tring to password protect a directory on my webserver and I can't get it to work. I have read on pages on the internet about the subject but I guess I am stupid. I have Redhat 8.0 with apache 2.0.40. I have created a .htaccess file in the folder I want to protect. /var/www/html/private
Its contents are as follows:
AuthUserFile /var/www/.htpasswd
AuthGroupFile /dev/null
AuthName "personal"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
I was also playing with permissions to. The .htaccess file is currently set:
Owner: apache
group: root
rwxr-xr-x
the .htpasswd file is located in /var/www
its contents are in the format
user:encrypted password
the permissions include
owner: root
group: root
rwxr-xr-x
I have started and stopped the httpd service numerous times and when I go to the private folder on the website it just displays my directory without any password boxes or anything. I created the .htpasswd with the htpasswd -c command. I don't know what I am doing wrong. Any suggestions would be greatly appricated. Thanks.
Jamie
|