Forum Moderators: phranque

Message Too Old, No Replies

password protection

How can I do that for all of my virtual hosting

         

moty66

12:29 pm on Nov 16, 2005 (gmt 0)

10+ Year Member



Hello
I have apache2 webserver
and I have a httpd.conf file, i write this line at the end of the file

Include /usr/local/web/webcp/httpd/include/include.httpd
in this include file I have something like this


## Domain www.example.com >> 217.64..#*$!.#*$!
Include /usr/local/web/webcp/httpd/include/2805788260.httpd

and in 2805788260.httpd I have somethign like this


..
..
..
..
my virtual site configuration
..
.
.
then i have
..

Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
<Directory "/usr/local/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Now what I was is to change the example.com/awstats/awstats.pl to a protected file or directory with username and password

but I dont want to modify all my virtual hosting (about 50 site)
I want to add something in my httpd.conf file to do that
it is possibile

sorry for my english it is so bad

thank you

jdMorgan

1:51 pm on Nov 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could use <FilesMatch> and <DirectoryMatch> containers to enclose Apache authentication directives, so that only the stats directory or script file is password-protected.

Also, see the "Satisfy" section of Authentication, Authorization, and Access Control [httpd.apache.org] for some more ideas.

Jim

moty66

5:26 pm on Nov 17, 2005 (gmt 0)

10+ Year Member



thank you, I will study this link
and I will write back