Enable the apache errorlog to show the real source IP

eitanc

Well-Known Member
Jan 31, 2010
122
17
68
Hello,

The error log of apache, at /usr/local/apache/logs/error_log , shows the IP of the reverse proxy system I work with.
I tried to find a way to change it to show the real source IP (e.g. xff , x-forwarded-for), of the actual request initiating client, but found only the following post:

But before I dive into low level changes - I wonder, does CP has a way to do this "officially"?
 

andrew.n

Well-Known Member
Jun 9, 2020
995
368
63
EU
cPanel Access Level
Root Administrator
mod_remoteip

 
  • Like
Reactions: cPRex

eitanc

Well-Known Member
Jan 31, 2010
122
17
68
Thanks Andrew, I already did it, but it affects only the access log, hence the visitors to the sites, not the error log, which still shows the proxy servers' IPs.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Unfortunately there isn't a drop-in fix for the error log. There's some good discussion on this here:


which links to this guide:


but it would need to be manually configured.
 
  • Like
Reactions: eitanc

eitanc

Well-Known Member
Jan 31, 2010
122
17
68
@cPRex - the above feature request is still on moderation, for 15 days... can you see how it can be approved?