Cronologは、Web Serverのアクセスログを管理するツールで、特にapacheと組み合わせると、日ごとあるいは月ごとに、指定したディレクトリにログファイルを書き込んでくれる便利なツールです。
1.Cronologのインストール
portsを利用します。
# cd /usr/ports/sysutils/cronolog # make install
これでインストールは終わりです。最新のcronologは2000年4月現在、1.6.1です。
2.httpd.confの書き換え
僕の場合、月ごとのディレクトリにcombinedなLogFormatで、httpd-access.logを置きたかったので、CustumLogの記載されている行の後に、次の2行を挿入しました。
# cd /usr/local/etc/apache/ # ee httpd.conf ----- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" TransferLog "|/usr/local/sbin/cronolog /var/log/%Y/%m/httpd-access.log" -----