Apache 2 Windows rotatelogs help

1.8k Views Asked by At

I've been trying to use rotatelogs.exe on Windows Server 2k to rotate the access.log. But whenever I restart apache it gets an error when reading http.conf

Here is the line:

CustomLog "|D:\Apache2\Apache2\bin\rotatelogs.exe D:\Apache2\Apache2\logs\access.log 86400” common

I don't know why it's not working. The paths are correct, common log format is defined. Is my syntax wrong somewhere?

2

There are 2 best solutions below

1
On

Try forward slashes (/) instead of backslashes (\).

0
On

Another approach would be to use HalRotateLogs.exe (from Halcyon Logic).

See: www.halcyonlogic.com/index.php#tab-products

Create a Windows Scheduled Task to run the utility at a specific interval of your choice (ex: everyday at midnight), set it and forget it.

Keep things simple.