Additions:
LogFormat
Deletions:
to create one log file for all vhosts add %v to your access LogFormat
LogFormat "%v %h %l %u %t \"%r\" %>s %b" common
and must then use split-logfile to split into separate logs
NOTE: You cant do this with your vhost error logs
Additions:
http://httpd.apache.org/docs/2.2/mod/mod_log_config.html
Additions:
http://linux.die.net/man/3/strftime
normal logrotate does not work since apache locks the files open
but you can manually truncate
or shorten them
rotatelogs is an apache utility you can pipe logs to and rotate them
(in seconds)
hourly (12 logs/day)
hourly (24 logs/day)
daily (7 logs/week)
to create one log file for all vhosts add %v to your access LogFormat
and must then use split-logfile to split into separate logs
normal logrotate does not work since apache locks the files open
but you can manually truncate
or shorten them
rotatelogs is an apache utility you can pipe logs to and rotate them
(in seconds)
hourly (12 logs/day)
hourly (24 logs/day)
daily (7 logs/week)
to create one log file for all vhosts add %v to your access LogFormat
and must then use split-logfile to split into separate logs
Deletions:
truncate
shorten
hourly (12/day)
hourly (24/day)
daily
add %v to your access LogFormat
and use split-logfile
Additions:
apache httpd mod_log logs http access and errors
you can customise the log format
you can conditionally omit certain entries
# Mark requests for the robots.txt file
SetEnvIf Request_URI "^/robots\.txt$" dontlog
# Log what remains
CustomLog logs/access_log common env=!dontlog
normal logrotate does not WORK with apache locks the files open but you can manually
truncate
$ > /var/log/access_log
shorten
$ tail -10000 /var/log/access_log > /var/log/access_log
without restarting apache httpd otherwise you must use
hourly (12/day)
CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%I 3600" common
hourly (24/day)
CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%H 3600" common
daily
CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%w 86400" common
add %v to your access LogFormat
LogFormat "%v %h %l %u %t \"%r\" %>s %b" common
and use split-logfile
NOTE: You cant do this with your vhost error logs
you can customise the log format
you can conditionally omit certain entries
# Mark requests for the robots.txt file
SetEnvIf Request_URI "^/robots\.txt$" dontlog
# Log what remains
CustomLog logs/access_log common env=!dontlog
normal logrotate does not WORK with apache locks the files open but you can manually
truncate
$ > /var/log/access_log
shorten
$ tail -10000 /var/log/access_log > /var/log/access_log
without restarting apache httpd otherwise you must use
hourly (12/day)
CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%I 3600" common
hourly (24/day)
CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%H 3600" common
daily
CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%w 86400" common
add %v to your access LogFormat
LogFormat "%v %h %l %u %t \"%r\" %>s %b" common
and use split-logfile
NOTE: You cant do this with your vhost error logs
Deletions:
Additions:
>>http://httpd.apache.org/docs/1.3/logs.html
http://httpd.apache.org/docs/2.0/logs.html
http://httpd.apache.org/docs/2.2/logs.html
>>===mod_log===
LogFormat "%h %l %u %t \"%r\" %>s %b" common
http://httpd.apache.org/docs/2.0/logs.html
http://httpd.apache.org/docs/2.2/logs.html
>>===mod_log===
LogFormat "%h %l %u %t \"%r\" %>s %b" common