.htaccess for script aliased directories‏

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

 



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.

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux