Rotate (Backup) Logs

CustomLog "|C:/xampp/apache/bin/rotatelogs.exe D:/logs/access/access_log.%Y-%m-%d 86400" combined
    
ErrorLog "|C:/xampp/apache/bin/rotatelogs.exe D:/logs/error/error_log.%Y-%m-%d 86400"

Note:

  • "|" in the beginning is required
  • Must rmeove "combined" and "common" at the end of ErrorLog or apache won't be started.

 

Reference:

  • http://httpd.apache.org/docs/2.2/programs/rotatelogs.html
  • http://www.kikinote.com/article/3780.html