I am using Array Networks Load Balancer in front of two Apache web servers (RHEL 8, Apache 2.4.62).
My issue is: Apache access logs only show the Load Balancer IP, not the real public client IP.
What I need:
I want Apache access logs to store the actual client’s public IP, not the LB’s IP.
What I have tried:
Enabled mod_remoteip in Apache
Added this configuration:
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy <LB_IP>
LogFormat "%a %l %u %t \"%r\" %>s %b" combined
Restarted Apache
I also used tcpdump and I see packets coming from the LB, but everything is in hex format because traffic is HTTPS (port 443).
I am not sure whether the Array LB is actually inserting the X-Forwarded-For header or not, and Apache still logs only the LB IP.