ホームサーバ化その4:(外向け)Web サーバ(2)
Web ログ解析
まだまだ先の話であるが、
Web サーバを公開したときのログを解析するツールを
インストールする。
analog のインストール
http://www.iddl.vt.edu/~jackie/analog から
analog-5.32-2.src.rpm をいただいてきて、
rebuild する
linkstationVine# rpm --rebuild analog-5.32-2.src.rpm
/usr/src/redhat/RPMS/ppc/analog-5.32-2.ppc.rpm ができ上がったので、
linkstationVine# rpm -ivh analog-5.32-2.ppc.rpm
analog ##################################################
analog の設定
/etc/analog.conf を書く
linkstationVine# diff -c analog.cfg.orig analog.cfg
*** analog.cfg.orig 2004-01-12 02:02:07.000000000 +0900
--- analog.cfg 2004-01-12 02:08:30.000000000 +0900
***************
*** 10,19 ****
#
# If you need a LOGFORMAT command (most people don't -- try it without first!),
# it must go here, above the LOGFILE commands.
! LOGFILE access_log
! # LOGFILE /old/logs/access_log.*
! # OUTFILE Report.html
! # HOSTNAME "[my organisation]"
#
# You probably don't need to change anything below this until you are
# experienced.
--- 10,27 ----
#
# If you need a LOGFORMAT command (most people don't -- try it without first!),
# it must go here, above the LOGFILE commands.
! LOGFILE /var/Backup/httplog/*
! LOGFILE /var/log/httpd/access_log*
! OUTFILE どこそこ/index.html
! HOSTNAME "[www.yamasita.jp]"
! LANGUAGE JAPANESE
! REFERRER ON
! FILEEXCLUDE *.jpg
! FILEEXCLUDE *.JPG
! FILEEXCLUDE *.png
! REFREPEXCLUDE http://www.yamasita.jp/*
! SUBDOMAIN *.*.*
!
#
# You probably don't need to change anything below this until you are
# experienced.
ログファイルの入手
Link Station には、まだ Web サーバのログがないので、
www.yamasita.jp のログを入手する
linkstationVine# cd /var/Backup/
linkstationVine# rsync --recursive rsync://tp310/Backup/httplog .
analog の実行
linkstationVine# analog
analog: analog version 5.32/Unix
analog: Warning L: logfiles /var/Backup/httplog/tp310_2003.12.21 and
/var/log/httpd/access_log.1 overlap: possible double counting
(For help on all errors and warnings, see docs/errors.html)
analog: Warning L: logfiles /var/Backup/httplog/tp310_2003.12.28 and
/var/log/httpd/access_log.1 overlap: possible double counting
analog: Warning L: logfiles /var/Backup/httplog/tp310_2004.01.04 and
/var/log/httpd/access_log.1 overlap: possible double counting
実験的にアクセスしたときの log が残っていたので、文句を言っているが、
無視。
確認
analog.cfg で指定した"どこそこ/index.html"をブラウザで見て、
一人悦に入る・・・
つもりだったが、見てみるとイメージが表示されていない
/var/www/html/images を "どこそこ" に
シンボリックリンクを張ってしのぐが、いまいち。
spec ファイル作り直そうかな、、、
←
BUFFALO Link Station をハックしよう
→ Filesystem features
Copyright (C) 2004 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp
山下康成@京都府向日市