分析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 閱讀(255)
評論(0) 編輯 收藏