I administrate a Windows Server 2003 (Standard Edition, 32-bit) installation running Apache2 and ColdFusion. The server has over 100 virtual hosts, each with an access log and an error log. I've been looking for an analog to (or a win32 port of) the classic Linux logrotate command, which allows logfile rotation without interrupting Apache's locking mechanism.
- stop apache
- rotate the log
- start apache
Obviously, this is not desirable with so many virtual hosts, as it would stop and restart Apache hundreds of times per night.
I have also investigated using rotatelogs, which comes with apache, and cronolog, which use piped output to create individual daily/weekly/monthly logs. These programs do not require a restart of apache to rotate the logs, but they spawn an instance of the process for each logfile, resulting in hundreds of additional daemons running, each consuming 200-300k of memory.
I also tried compiling the classic Linux logrotate command on cygwin, but with no luck.
Do any of you have suggestions about what I should try next? Or, even better, have any of you managed to get the classic Linux logrotate command to compile on cygwin, or any other win32 compiler?