Hi, Does anyone know why this wouldn't work? I don't use .htaccess but my friend does and he asked me, so where else would I bring the question but here.
.htaccess file in /Users/admin1/Sites
[Neo:~/Sites] admin1% more .htaccess
AuthName "Neo on Vegas"
Does he need to do anything in httpd.conf in addition to this? Thanks everyone.
Got it to work. Here is the solution.
Both files should be in the directory which contains the documents to restrict access to. Once you get it to work you can experiment with moving the .htpasswd file.
#creates .htpasswd file. Write over old one. It will prompt you for a passwd.
htpasswd -c .htpasswd netman
#.htaccess file stuff.
AuthName "Realm of Darkness"
require user netman
#You must edit the httpd.conf file to allow override authconfig so apache doesn't ignore it.
Options Indexes Includes FollowSymLinks
Allow from from all
You might have to mess with the permissions of .htaccess and .htpasswd. I got it to work running them as 644 but I think it would be better to run it with 600. One last thing is the group and ownership. I changed them to apache. I have not checked to see it it will run under other owner and groups. Don't forget to restart Apache. /etc/rc.d/init.d/httpd restart