Our disk is getting full real fast on Windows with Apache Logs.I want to overwrite old log files so that there are only 10 files at any 1 time with a capacity of 5M each. Is there a way to use rotate 4 like on logrotate.conf in Unix to rotate the logs after 4 files are created in Windows ?

I looked at this entry but that didn't help. Rotate other logs with rotatelogs.exe

2 Answers 2


New solution

#ErrorLog "logs/error.log"
ErrorLog "|bin/rotatelogs.exe -l D:/Apache2.2/logs/error.%Y.%m.%d.log 86400"

#CustomLog "logs/access.log" common
CustomLog "|bin/rotatelogs.exe -l D:/Apache2.2/logs/access.%Y.%m.%d.log 86400" common

#TransferLog "D:/Apache2.2/logs/ssl_access.log"
TransferLog "|bin/rotatelogs.exe -l D:/Apache2.2/logs/ssl_access.%Y.%m.%d.log 86400"

#CustomLog "D:/Apache2.2/logs/ssl_request.log" \
#          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
CustomLog "|bin/rotatelogs.exe -l D:/Apache2.2/logs/ssl_request.%Y.%m.%d.log 86400" \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
ErrorLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/www.example.com/http.errorlog.%Y-%m-%d.txt 86400"
CustomLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/www.example.com/http.accesslog.%Y-%m-%d.txt 86400" combinedtrueout_host
CustomLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/www.example.com/http.deflatelog.%Y-%m-%d.txt 86400" deflate
  • 2
    Welcome to Server Fault! Whilst this may theoretically answer the question, please provide context around code so others will have some idea what it is and why it’s there.
    – HBruijn
    Nov 10, 2015 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.