Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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"

share|improve this answer
Please improve the formatting. This answer is difficult to read as it is. – kasperd Nov 10 '15 at 13:12
ErrorLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/ 86400"
CustomLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/ 86400" combinedtrueout_host
CustomLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/ 86400" deflate
share|improve this answer
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 '15 at 12:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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