apache
httpd.confで下記のように書けば、ローテートされる。 ErrorLog "| /usr/sbin/rotatelogs /var/log/error_%Y%m%d.log 86400 540" CustomLog "| /usr/sbin/rotatelogs /var/log/access_%Y%m%d.log 86400 540" combined
access.logのフォーマットを変更し、処理にかかった時間(秒)を表示する。 [%T]の部分を追加 LogFormat "%h %l %u %t %T \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t %T \"%r\" %>s %b" commonaccess.logから、処理…
▼httpd.conf AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe"
httpd.confの修正、再起動前に書式をチェック! httpd -t
C:\Program Files\Apache Software Foundation\Apache2.2\bin\htpasswd.exe .htpasswd am001 .htpasswdに、ユーザが作成される
awkコマンドで色々できるみたい。対象時間内で、レスポンスに4秒以上かかったログの抽出 grep '28/Jan/2009:14' /etc/httpd/logs/xxx.log | awk '$6 > 4 {print $4,$6,$8}' | tail
/etc/init.d/httpd graceful
/etc/rc.d/init.d/httpd restart か /etc/init.d/httpd restart