user2502969
user2502969

Reputation: 121

Apache 2.4.4 - rotatelogs error - parameter is incorrect

I have searched all day for an answer to this. I issue this directive in httpd.conf:

CustomLog "|bin/rotatelogs logs/access_log.%Y-%m-%d 86400" common

This worked in 2.2. common is defined earlier in the file.

I keep getting this error when trying to start the service:

AH00104: unable to start piped log program 'bin/rotatelogs logs/access_log.%Y-%m-%d 86400': The parameter is incorrect.

Any help will be most appreciated! Thank you!

Upvotes: 4

Views: 4792

Answers (3)

Igor
Igor

Reputation: 688

I've found the issue with rotatelogs running on Windows Server. You should pay attention to the slash that is used in the SRVROOT variable within httpd.conf. It should be like this:

Define SRVROOT "C:/apache24"

and not like I did:

Define SRVROOT "C:\apache24"

If the path is like the last one, server will start, but will not write any logs.

Upvotes: 0

user2896861
user2896861

Reputation: 19

On Windows OS path to rotatelogs have to contains .exe file extension to not produce error "could not open reliable pipe to" in error log. Example : CustomLog "|bin/rotatelogs.exe logs/access 15M" common

Upvotes: 1

user2502969
user2502969

Reputation: 121

Ok, so I'm on Windows Server 2008. I had to add .exe to rotatelogs. Could have sworn I tried that before but I guess not. All set.

Upvotes: 8

Related Questions