分析apache访问日志的项目,例如
http://www.mora.cn/awstats/awstats.pl?config=www.mora.cn经理快速讲的,简单记录一下,有空自己44
参考文章:
http://www.chedong.com/tech/awstats.html1、cd /usr/local/
2、tar -zxvf awstats6.7.tar.gz
3、rm -f awstats6.7.tar.gz
4、mv awstats6.7 awstats
5、pert awstats/tools/awstats_configure.pl进行安装
6、vi /etc/awstats/awstats.192.168.1.20.conf 修改其中的LogFile=为对应的apache日志
7、vi /usr/local/apache2.2.4/conf/httpd.conf
a、修改<IfModule log_config_module>模块为LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined模式的日志记录方式
b、加入如下内容#
# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
# Note that path "/usr/local/awstats/" must reflect your AWStats Installation path.
#
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/"
#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/local/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
8、perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=192.168.1.20 -update
9、把8这行语句加入到crontab中进行定时执行
posted on 2007-10-17 13:55
flyepp 阅读(250)
评论(0) 编辑 收藏