3

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?

Jeremy Stein
  • 19,171
  • 16
  • 68
  • 83
Tyler
  • 31
  • 2

2 Answers2

4

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

Jeremy Stein
  • 19,171
  • 16
  • 68
  • 83
1

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.

Stephan
  • 41,764
  • 65
  • 238
  • 329
Richard
  • 21
  • 2