<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<blockquote><meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</style>>


> > Do I also need to add a new entry in httpd.conf or load a new apache<br>>> > module?<br>> ><br>> >Not by default, no.<br>>> <br>> >There are several AllowOverrides statements in the default httpd.conf.<br>> >Which did you modify?<br>> ><br>> >The one you wanted should be around line 327, looking like this:<br>>> <br>>    > Options Indexes FollowSymLinks<br>>> <br>>> #<br>>> # AllowOverride controls what directives may be placed in .htaccess files.<br>>> # It can be "All", "None", or any combination of the keywords:<br>>> #   Options FileInfo AuthConfig Limit<br>>> #<br>>    > AllowOverride None<br>>> <br>>> #<br>>> # Controls who can get stuff from this server.<br>>> #<br>>    > Order allow,deny<br>>    > Allow from all<br>>> <br>>> </Directory><br>>> <br>>> Change the AllowOverride to AuthConfig, and that should be just about it.<br>>> <br>>> You don't want to use the AuthDBMType unless you're using htdbm<br>>> instead of htpasswd to generate your password file lists.<br>>> <br>>> You also need to make sure that apache has access to the area where<br>>> you're putting your .htaccess.<br>>> <br>>> If you're stuffing this in your home directory like it looks above,<br>>> apache doesn't have permissions in here unless you've modified your<br>>> homedir to 711 from 700. Selinux can also cause some issues in here as<br>>> well if you have it enabled and haven't changed contexts.<br>>> <br>>> Without fully seeing the config that you're using and some info about<br>>> the dir you're trying to restrict, it'll be a little harder to offer<br>>> more help.<br>><br>>I reset AllowOverride  to AuthConfig and it's still not working.<br>><br>>OK the dir I am trying to password protect (named www) is the home or main or root directory of<br>>www.mydomain.com - it is owned by apache  The permissions on www were set to 755.  .htaccess is located<br>>inside www and is also owned by apache.  .htpasswd is just below, or outside of www  and outside of web access<br>>and is also owned by apache.<br>><br>>I do have selinux enabled I believe.<br>><br>>For my httpd.conf, I have one main configuration file in /etc/httpd/conf and for each virtual domain, I have individual<br>>www.mydomain.com.conf files with associated virtual host tags inside, and located in /etc/httpd/conf.d directory.<br>><br>>I also tried placing the AllowOverride AuthConfig directive inside the individual conf.d virtual domain<br>
>files but then apache would not reload, so I took them out and reloaded again.<br>><br>>Are the individual conf.d files causing the problem?<br>><br>In addition to the above, I have tried all three of the two below contents inside of my<br>.htaccess file as suggested:<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><Location /secure><br>
AuthType basic<br>
AuthName "private area"<br>
AuthBasicProvider file<br>Require valid-user<br>
</Location><br><br>AuthUserFile /home/maindir/.htpasswd<br>AuthType Basic<br>AuthName "My Secret Folder"<br>Require valid-user<br><br><br><br><br><br><hr>Going green? <a href="http://green.msn.com/galleries/photos/photos.aspx?gid=164&ocid=T003MSN51N1653A" target="_blank">See the top 12 foods to eat organic.</a>
</blockquote><br /><hr />Use video conversation to talk face-to-face with Windows Live Messenger. <a href='http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_video_042008' target='_new'>Get started!</a></body>
</html>