% tar zxvf accesswatch-1.33.tar.gz
% cd accesswatch-1.33/
% tar zxvf accesswatch-1.33-i18n-19970819.tar.gz
% patch -p1 < accesswatch-1.33-i18n.diff
accesswatch.cfgの変更。
$language = ( defined $ENV{'LANG'} ? $ENV{'LANG'} :
'ja=ja_JP.EUC');
$accessLog = "/usr/local/etc/apache/logs/access_log";
$includeURL = ".*";
すべてのページを監視する
$excludeURL = ".pl|.cgi|.txt|.gif|.jpg|.xbm";
監視しないファイルの種類
$siteName = "W3.ITOH.NET";
サイト名を書く
$orgname = "高村さんのページ";
下のドメインの組織名を書きます。
$orgdomain = "itoh.net";
組織のドメインを書きます
$bodyArgs = "BGCOLOR=\"\#80C0C0\"";
適当にバックグランドの色を変更します。
パーミッションの変更スクリプトを動かした後、webから見れるところにフォルダごと移動します。
% rm accesswatch-1.33-i18n-19970819.tar.gz
accesswatch-1.33-i18n.diff
% chmod 755 setpermissions.sh ; setpermissions.sh
% cd .. ; mv accesswatch-1.33 ~/public_html/accesswatch
Y2K対策
accesswatch.plの中の
#-----------------------------------------------------------------------------#
# AccessWatch function - SetDateInfo
# Purpose : Sets global date variables, returns Day/Month/Year as
specified
# by log standards.
#-----------------------------------------------------------------------------#
sub SetDateInfo {
#get current date and return as string (day/month/year)...
@mnths = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
@longmonths = ('January', 'February', 'March', 'April', 'May',
'June', 'July', 'August', 'September', 'October',
'November', 'December');
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
$year = "19$year";
$mday = "0$mday" if ($mday < 10);
return "$mday/$mnths[$mon]/$year";
}
の
$year = "19$year";
が諸悪の根元です。
$year = $year - 100;
$year = "0$year" if ($year < 10);
$year = "20$year";
と変更すれば少なくともあと38年くらい(?)は使えるでしょう。
実行
accesswatch.plを実行します。
% ./accesswatch.pl
index.htmlとdetails.htmlが生成されれば成功。ページを見て問題なければcrontabに書いて
おきます。