latest 50 entries

2006年02月23日

  • Apache2(Win) ログのローテーション

私的なメモ(^^;)

Windows環境でApache2のログを24時間毎にローテートする。
httpd..conf の Customlogディレクティブで指定。

CustomLog "| c:/apache2/bin/rotatelogs.exe c:/apache2/logs/%Y%m%d_access.log 86400" common

パイプを使ってるので、 "| c:~" で "|" と "c:" の間に半角スペースがあることが注意。
ログファイル名は 20030226_access.log と日付が付く。
86400 は秒で24時間。