*SOLVED* httpd.config problem

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
davisaggie
Forum Newbie
Posts: 16
Joined: Mon Aug 20, 2007 3:40 pm
Location: Salinas, CA

*SOLVED* httpd.config problem

Post 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.
Last edited by davisaggie on Tue Aug 21, 2007 6:50 pm, edited 2 times in total.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post 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 ;)
There are 10 types of people in this world, those who understand binary and those who don't
davisaggie
Forum Newbie
Posts: 16
Joined: Mon Aug 20, 2007 3:40 pm
Location: Salinas, CA

Post by davisaggie »

Thanks for the tip Vlad, I'll give that one a try.
davisaggie
Forum Newbie
Posts: 16
Joined: Mon Aug 20, 2007 3:40 pm
Location: Salinas, CA

Post by davisaggie »

Specifying the full path name for the directory did it. Thanks for the help.
Post Reply