[CentOS] .htaccess for script aliased directories

Thu Apr 24 18:46:24 UTC 2008
Pam Astor <pamastor at hotmail.com>

With the great assistance I got here I was able to get .htaccess to work on a centos 5.1 box running Apache 2.2.3 a few days ago.
 One other question.  I am trying to protect a sub dir within the web space of a domain that is serving site statistics of awstats generated pages.  The path to the dir is /home/user1/www/awstats.  When testing, I am able to get a username and password prompt for the front page of the site, i.e. for www.mydomain.com, when I place the .htaccess file in www, but I can’t get a prompt for www.mydomain.com/awstats when I place the .htaccess in awstats.  
I am using the below script alias in the virtual domain conf.d file for this site the awstats directory is located in, so that awstats can generate the log file stats and alias them to the awstats dir which is empty:
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/
I’m assuming that’s why I can’t get a login prompt – any suggestions as to how to protect the awstats dir with .htaccess for a script alias’ed directory?
The .htaccess file which I was using and works fine for the main www dir is:
AuthName “/www”
AuthType Basic
AuthUserFile /home/user1/.htpasswd
Require user guest

In a rush? Get real-time answers with Windows Live Messenger.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20080424/c4c467bc/attachment-0004.html>