You can consult Apache Docker behind reverse proxy for hints how to adopt Apache to use real IP.
this is a problem as if you don’t limit the header to “known good” trusted proxies everybody could spoof the originating IPs. There is no need to know exact IPs you can use IP ranges like 192.168.0.0/24
If you don’t care about spoofing you can provide the whole IPv4 range (but I’m not going to share the syntax to avoid “copy&paste admins” from adopting this insecure approach).