[techtalk] Apache access.conf help

Christian MacAuley jellhead at jellspace.net
Mon Jun 12 21:05:01 EST 2000


> I was wondering if anyone on here would be so kind as to help me out with
> this problem I've been struggling with for the last two days.
>
> I need to configure apache so that the entire site that is password
> protected. I have tried configuring access.conf and I put .htpasswd and
> .htaccess in the directories and all, and it's still not working.I'm very
> confused. I followed the directions outlined in the Apache book, and on
> the apache page to no avail. What am I missing?

Actually, your access.conf file isn't neccessarily used by Apache.  It's
(usually) disabled by default in the catchall file httpd.conf, which you can
turn on/off with the ResourceConfig and/or AccessConfig directives in
httpd.conf.

I like keeping all my config information in httpd.conf, so my httpd.conf
file has the following line telling Apache to ignore the other conf files:

ResourceConfig /dev/null

Then to password protect the whole site (users stored in this case in a
Berkley DBM file), i use these directives:

<Directory />
  AuthType Basic
  AuthName "Restricted Information"
  AuthDBUserFile /access/sci/sciusers
  require valid-user
</Directory>

Of course, if i just wanted to password protect one subdirectory, i'd
replace / with /users, or whatever my filename was.

One more thought (although i'm almost positive this isn't your problem) -
you *do* have to restart Apache for your changes to .conf files to take
effect.  My preferred method of doing this is by using this command (not
neccessarily on your path)

apachectl graceful

Hope this helps!

~Christian


____________________________________________________________________
» Christian MacAuley » jellhead at jellspace.net » htp://jellspace.net






More information about the Techtalk mailing list