Restoring Real Client IPs in Tomcat Behind a Proxy with RemoteIpValve
Tomcat behind a load balancer logs the proxy's IP, not the visitor's. RemoteIpValve restores the real client address from X-Forwarded-For and the scheme from X-Forwarded-Proto — if you configure the trust regex and valve ordering correctly.