<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
> > >For my httpd.conf, I have one main configuration file in /etc/httpd/conf<br>> > and for each virtual domain, I have individual<br>> > >www.mydomain.com.conf files with associated virtual host tags inside, and<br>> > located in /etc/httpd/conf.d directory.<br>> <br>> Okay. These are vhost configs only. You *can* set them globally in<br>> httpd.conf, but they can be overwritten later, so it's best to do it<br>> vhost by vhost.<br><br>OK so do/set what vhost by vhost?  Place the  AllowOverride AuthConfig <br>directive vhost by vhost?  If that's what yo u meant, I tried again inserting the <br><br><Directory /><br>    Options FollowSymLinks<br>    AllowOverride AuthConfig<br></Directory><br><br>and the <br><br><Directory /><br>    AllowOverride AuthConfig<br></Directory><br><br>directives inside the individual vhost file and am still not getting a login prompt on the site.<br>However this time, apache did reload for both directives.<br>The reason why It did not reload last time, was because all I did earlier was<br>insert the  AllowOverride AuthConfig statement inside the vhost file, without the directory tags,<br>so at least there is some progress there ;)<br><br>> > >I also tried placing the AllowOverride AuthConfig directive inside the<br>> > individual conf.d virtual domain<br>> >  >files but then apache would not reload, so I took them out and reloaded<br>> > again.<br>> <br>> This depends on where within the vhost config you put them. Apache<br>> should tell you exactly what line of the config the error is on, and<br>> what exactly is wrong with it.<br><br>I did not get indication from apache what line the syntax error <br>was or what file either, all I got was:<br><br>Reloading httpd: not reloading due to configuration syntax error<br>                                                           [FAILED]<br>But I guess that point is moot now since at least httpd is reloading.<br>I have however got line-syntax indications for other apache errors,<br>just don't know why I was not getting them for this error.<br><br> <br>> > >Are the individual conf.d files causing the problem?<br>> <br>> Only because they aren't formatted properly.<br>> <br>> <br>> > <Location /secure><br>> > AuthType basic<br>> > AuthName "private area"<br>> > AuthBasicProvider file<br>> > AuthDBMUserFile /home/maindir/.htpasswd<br>> > Require valid-user<br>> > </Location><br>> <br>> This one is wrong because you're pointing a DBM statement to a flat<br>> user file which isn't in dbm format.<br>> <br>> > <Location /secure><br>> >  AuthType basic<br>> >  AuthName "private area"<br>> >  AuthBasicProvider file<br>> > Require valid-user<br>> >  </Location><br>> <br>> This one sets the auth type outside everything else, and provides<br>> multiple names.<br>> <br>> > AuthUserFile /home/maindir/.htpasswd<br>> > AuthType Basic<br>> > AuthName "My Secret Folder"<br>> > Require valid-user<br>> <br>> <br>> <br>> Here's a statement that I know works, from my nagios setup at home,<br>> altered for what you're looking to do.<br>> <br>> <br>> <Directory "/change/this"><br>>    Options None<br>>    AuthName "Nagios Access"<br>>    AuthType Basic<br>>    AuthUserFile /etc/httpd/htpasswd.users<br>>    Require valid-user<br>> </Directory><br><br>OK, just to make sure I am doing this exactly correct, <br>do I substitute "Nagios Access" to whatever login name I used when I <br>created my .htpasswd file?<br><br>Also, for Directory "/change/this", do I set this to the directory<br>where my .htpasswd file is located? Or is this the path to the dir I am trying to<br>protect?<br><br>Or, for     AuthUserFile /etc/httpd/htpasswd.users, is this the path and filename<br>of the .htpasswd file? <br><br><br><br><br><br><br><br><br /><hr />Get in touch in an instant. <a href='http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_getintouch_042008' target='_new'>Get Windows Live Messenger now.</a></body>
</html>