AWS
ELB
EC2
Apache 2.4.39
When using a load balancer, web server logs like Apache only show the ELB’s IP address, not the actual client IP.
With AWS ELB, the real client IP is in the “X-Forwarded-For” header, so you need to configure your web server to log this header.
Apache conf addition sample
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
