0

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?

2
  • Did you get the solution of this, I am also facing same issue. Commented Jun 28, 2023 at 12:40
  • 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 Commented Jun 28, 2023 at 14:45

1 Answer 1

0

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).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.