# mkdir /etc/awstats
# mkdir /var/lib
# mkdir -m 777 /var/lib/awstats
# cp /usr/local/www/awstats/cgi-bin/awstats.model.conf /etc/awstats/awstats.www.mysite.com.conf
# ee /etc/awstats/awstats.www.mysite.com.conf

第51行:LogFile=”/var/log/apache/www.mysite.com/%YYYY-24%MM-24/httpd-access_%YYYY-24%MM-24%DD-24.log”
第152行:SiteDomain=”www.mysite.com”
第167行:HostAliases=”mysite.com www.mysite.com 127.0.0.1 localhost 192.168.0.74″
第202行:DirData=”/var/lib/awstats”
第238行:AllowToUpdateStatsFromBrowser=1
第449行:DefaultFile=”index.php index.htm index.html”
第1515行:Include “awstats.www.mysite.com.conf”

# ee /usr/local/etc/apache22/Includes/awstats.conf

#
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses “/usr/local/www/awstats/classes/”
Alias /awstatscss “/usr/local/www/awstats/css/”
Alias /awstatsicons “/usr/local/www/awstats/icons/”
ScriptAlias /awstats/ “/usr/local/www/awstats/cgi-bin/”

#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory “/usr/local/www/awstats/”>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

# apachectl configtest
# apachectl restart

# ee /usr/local/www/awstats/update-logs.sh

/usr/local/www/awstats/cgi-bin/awstats.pl -config=www.mysite.com -update

# chmod 755 /usr/local/www/awstats/update-logs.sh
# setenv EDITOR ee
# crontab -e

10 1 * * * /bin/csh /usr/local/www/awstats/update-logs.sh

不统计指定IP的访问量
SkipHosts=”x.x.x.x.”

参考:安装Apache2.2


免费在线记账服务,个人理财好帮手,小型企业财务管理工具。
http://www.keepaccounts.com/

0 Comments

Leave a Reply