go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Configure AWStats for each virtul host
 
Subject: Configure AWStats for each virtul host
Author: AwsEC2
In response to: Configure httpd to support AWStats
Posted on: 09/03/2012 11:56:42 PM

# cp /usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf /etc/awstats/awstats.example1.com.conf
# vi /etc/awstats/awstats.example1.com.conf


Make sure the following:
LogFile="/home/ec2-user/example1.com/access_log"
LogType=W
LogFormat=1
SiteDomain="example1.com"
DirData="/home/ec2-user/example1.com/awstats"
DirCgi="/cgi-bin/awstats"
DirIcons="/awstats/icon"
AllowToUpdateStatsFromBrowser=1


Here DirData is used for store updated statistics results. If it does not exist, create one first. Also, as the statistics is allowed to be updated from browser (AllowToUpdateStatsFromBrowser=1), DirData may have to be set to allow write permission for nobody (apache).

# mkdir /home/ec2-user/example1.com/awstats
# chmod 777 /home/ec2-user/example1.com/awstats



 

> On 09/03/2012 11:52:52 PM AwsEC2 wrote:


AWStats is now installed under /usr/local/awstats, but you may need to make some minor modifications to the Apache configuration file in order to use it via a web browser.

Step 1. Set global permisstion for the AWStats directory

<Directory "/usr/local/awstats/wwwroot/cgi-bin">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


Step 2. Local within each virtual host
<VirtualHost *:80>
  ServerName example1.com
  ServerAlias www.example1.com
  DocumentRoot /home/ec2-user/example1.com/html

# http://example1.com/cgi-bin/awstats/awstats.pl
  ScriptAlias /cgi-bin/awstats /usr/local/awstats/wwwroot/cgi-bin
  Alias /awstats /usr/local/awstats/wwwroot
  CustomLog "/home/ec2-user/example1.com/access_log" "combined"

</VirtualHost>






References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.