httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pam Astor <pamas...@hotmail.com>
Subject [users@httpd] .htaccess for script aliased directories‏
Date Thu, 24 Apr 2008 22:28:00 GMT

I am trying to password protect a sub directory 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 functional
prompt for www.mydomain.com/awstats when I place the .htaccess in the awstats dir.  The login
box comes up but it won't accept my username password combo, even though it will accept it
when I have the same .htaccess file in the www dir.
 
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 functional 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.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008
Mime
View raw message