Score:0

Apache rotatelogs.exe fails with "Couldn't start ErrorLog process"

cn flag

I am trying to make apache rotatelogs.exe work (Apache 2.4, windows 10 pro)

This is the configuration:

ErrorLog "C:/Temp/logs/error.log"
ErrorLog "|C:/Temp/rotatelogs C:/Temp/logs/error.log 10"  #option 1

<VirtualHost ...>
    ErrorLog "|C:/Temp/rotatelogs C:/Temp/logs/error.log 10"  #option 2
</VirtualHost>

The folder where apache is located is inside "C:/Program files (x86)/apache/...", so just in case there is an issue with escaping the spaces, I moved the location to the temp folder. (in addition to the rotatelogs.exe)

I am getting the error:

(OS 2)The system cannot find the file specified.  : AH00089: Couldn't start ErrorLog process 'C:/Temp/rotatelogs C:/Temp/logs/error.log 10'.
AH00015: Unable to open logs

I am starting apache as a service. I gave full control permission to Local Service to the C:/Temp/logs folder.

If I use option #1 (ErrorLog directive outside the VirtualHost, then no ErrorLog is created, and apache fails to start.

If I use option #2 (ErrorLog directive inside the VirtualHost, then C:/Temp/logs/error.log is created, but and fails to start with the same Couldn't start ErrorLog process error.

Is there a way to make it work?

Sagar Deshmukh avatar
bh flag
Did you get the solution of this, I am also facing same issue.
justadev avatar
cn flag
I think this works ``` ErrorLog "|bin/rotatelogs.exe -l logs/errorlog.%Y-%m-%d.log 86400" ErrorLog "|bin/rotatelogs.exe -n 20 logs/errorlog.%Y-%m-%d.log" ``` I tested a long time ago
Score:0
la flag

I have no experience with Apache httpd on Windows but I would expect that there the names of binaries get an .exe extension and you need to use c:/Temp/rotatelogs.exe rather than c:/Temp/rotatelogs (when that is the path where the rotatelogs program/binary is installed).

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.