.htaccess for script aliased directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux