Apache htaccess/Authentication - TechRepublic
General discussion
December 16, 2001 at 05:55 AM
rouse

Apache htaccess/Authentication

by rouse . Updated 24 years, 5 months ago

I’m trying to restrict access to certain folders under httpd. I created /etc/httpd/conf/passwd file and added user1 & user2. In httpd.conf, I added:

AllowOverride AuthConfig
AuthName “Apache Web Server”
AuthType Basic
AuthUserFile /etc/httpd/conf/passwd
require valid-user

This works fine, but I want only user1 to have access to /var/www/private. So I created a .htaccess file in private and put require user1. However user2 also can access this folder. Any ideas?
Thanks

This discussion is locked

All Comments