Page 1 of 1

*SOLVED* httpd.config problem

Posted: Tue Aug 21, 2007 6:05 pm
by davisaggie
I am trying to set up directory level authority checking for my site. I've followed the steps mentioned on the Apache doc site to modify my httpd.config file to the following:

<Directory />
Options FollowSymLinks
AllowOverride AuthConfig
</Directory>
<Directory /tatest>
AllowOverride AuthConfig
AuthType BASIC
AuthName "Test Auth"
AuthUserFile /usr/local/apache/passwd/passwords
Require test_user
Satisfy ALL
</Directory>

however if I go to http://www.hostname.com/tatest I do not get prompted for a password or id. Did I set this up wrong?

**EDIT**
If I put the directives for /tatest in a .htaccess file in the tatest directory, then I am prompted to login. I still would like to try and get the directory statements working.

Posted: Tue Aug 21, 2007 6:13 pm
by VladSun
Try to specify the full path to the system directory and change the "Require" line as follows:

Code: Select all

<Directory "/var/www/tatest">
  AllowOverride AuthConfig
  AuthType BASIC
  AuthName "Test Auth"
  AuthUserFile /usr/local/apache/passwd/passwords
  Require user test_user
  Satisfy ALL
</Directory>
PS: Isn't it "httpd.conf"? And don't forget to restart the Apache ;)

Posted: Tue Aug 21, 2007 6:23 pm
by davisaggie
Thanks for the tip Vlad, I'll give that one a try.

Posted: Tue Aug 21, 2007 6:50 pm
by davisaggie
Specifying the full path name for the directory did it. Thanks for the help.