apache config for pw protected web pages.
Jason
jason at kernbuilt.com
Fri Oct 10 15:57:40 EDT 2003
Hello all,
Problem: Trying to get the contents of a specific location (e.g.
www.domain.com/semiprivate) to be password protected. I have set the
.htpassword file in the "semiprivate" directory.
I have added the following:
<Directory /var/www/html/domain/semiprivate>
AllowOverride Options
</Directory>
Now I am confused and have some mixed information. Should I..
a. go to the .htaccess file in the /var/www/html/domain/semiprivate and add
the following:
AuthType Basic
AuthName "My secret pages"
AuthUserFile /path/to/directory/.htpassword
require valid-user
order deny,allow
allow from all
if so, where? Just drop em in any ole place?
--OR--
b. Edit the apache directives for the virtual host and add previous among
ServerAlias, DomainRoot and the like.
Thanks in advance.
Jason Kern
More information about the gnhlug-discuss
mailing list