>>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 http://httpd.apache.org/docs/2.2/mod/mod_log_config.html http://linux.die.net/man/3/strftime >>===mod_log=== apache httpd mod_log logs http access and errors ==log format== you can customise the log format %% LogFormat "%h %l %u %t \"%r\" %>s %b" common %% ==conditional log== 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 %% ==log rotate== normal logrotate does not work since apache locks the files open but you can manually truncate %% $ > /var/log/access_log %% or shorten them %% $ tail -10000 /var/log/access_log > /var/log/access_log %% without restarting apache httpd otherwise you must use ==piped log== rotatelogs is an apache utility you can pipe logs to and rotate them (in seconds) hourly (12 logs/day) %% CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%I 3600" common %% hourly (24 logs/day) %% CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%H 3600" common %% daily (7 logs/week) %% CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log.%w 86400" common %% LogFormat ---- REFERRERS {{backlinks}}