MLUG: Re: [MLUG] Apache basic auth question
Re: [MLUG] Apache basic auth question
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mark Haidekker wrote:
> Apache Experts,
> 
> I have a problem with Apache basic auth. I want to loosely protect a 
> directory, in this case one with lecture materials. Basic authentication, 
> nothing big. I followed the docs and howtos and created
> 
> - the password file with htpasswd
> 
> - A section in httpd.conf as follows:
> 
> <Directory /path/to/protected/directory>
> 	AuthType Basic
> 	AuthName "Access restricted to BE333 students"
> 	AuthUserFile "/path/to/passwords/passwords"
> 	Require user BE333
> </Directory>
> 

The contents of your Directory section should be in a .htaccess file 
under /path/to/protected/directory. The actual Directory section should 
read:

<Directory /path/to/protected/directory>
	AllowOverride AuthConfig Limit
	Order allow,deny
	Allow from all
</Directory>

Also see http://httpd.apache.org/docs-2.0/howto/htaccess.html

The password file should be outside of the browseable area, i.e. under 
/var/www/ (not /var/www/html/).

--
MK

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members