FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

LinkBack Thread Tools
Old 04-24-2008, 06:46 PM
Pam Astor
Default .htaccess for script aliased directories

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

Thread Tools

All times are GMT. The time now is 01:26 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org