0

It appears upgrading from Apache 2.2 to 2.4 changed the format of the errorlog file. Error logs used to show the remote client IP address.

Apache 2.2 errorlog: [Thu Aug 29 08:28:46 2019] [error] [client 50.57.61.20] message

Apache 2.4 errorlog: [Thu Aug 29 08:02:23.779174 2019] [:error] [pid 10036] message

Benevolently, Apache 2.4 added the ErrorLogFormat directive. So I specified:

 ErrorLogFormat "[%{u}t] [%-m:%l] [%a] %M"

But the %a format string that is supposed to show "Client IP address and port of the request" is giving me blank.

Now the errorlog: [Thu Aug 29 11:13:13.281770 2019] [-:error] message

What I expected: [Thu Aug 29 11:13:13.281770 2019] [-:error] [204.115.145.100] message

The format string Client IP addresses are correctly showing up in the accesslog, which has a %h format string for "Remote hostname". There is no such format string for ErrorLogFormat.

We're running a dedicated Rackspace CentOS 7.6.1810 running, Apache 2.4.6.

0

%a started working when we updated mod_wsgi from 3.4.18 to 4.6.2. Thanks to Fedor V. at WSM International.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.