色々なカテゴリーで表示されて分析に便利。
apache のアクセスログを awstats で表示。
# cat /etc/redhat-release
CentOS release 5.4 (Final)
# rpm -ivh awstats-6.7-1.el5.rf.noarch.rpm
警告: awstats-6.7-1.el5.rf.noarch.rpm: ヘッダ V3 DSA signature: NOKEY, key ID 6b8d79e6
エラー: 依存性の欠如:
        perl(LWP::UserAgent) は awstats-6.7-1.el5.rf.noarch に必要とされています
# yum install -y perl-libwww-perl.noarch
# rpm -ivh awstats-6.7-1.el5.rf.noarch.rpm
[ 設定 ]
- awstats
- apache
# apachectl restartcron で、1時間毎に下記が実行される。
# cat /etc/cron.hourly/00awstats
#!/bin/bash
if [ -f /var/log/httpd/access_log ] ; then
        exec /usr/bin/awstats_updateall.pl now          -confdir="/etc"                 -awstatsprog="/var/www/awstats/awstats.pl" >/dev/null
fi
exit 0
設定ファイル
# ls /etc/awstats/
awstats.localhost.localdomain.conf  awstats.model.conf
- apache
        DirectoryIndex awstats.pl
        Options ExecCGI
        order deny,allow
        deny from all
        allow from all
# ls /var/www/awstats/
awredir.pl  awstats042010.localhost.localdomain.bak  classes  icon  lang  plugins
awstats.pl  awstats042010.localhost.localdomain.txt  css      js    lib
http://localhsot.localdomain/awstats/awstats.pl にアクセス
HTMLに出力
# /var/www/awstats/awstats.pl -config=localhost.localdomain -output -staticlink > test.html
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.