1

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

Vijay
  • 123
  • 1
  • 3

2 Answers2

1

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"
7heo.tk
  • 111
  • 4
0
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
HBruijn
  • 77,029
  • 24
  • 135
  • 201
  • 2
    Welcome to Server Fault! Whilst this may theoretically answer the question, please [provide context around code](http://serverfault.com/help/how-to-answer) so others will have some idea what it is and why it’s there. – HBruijn Nov 10 '15 at 12:46