How to use mod_remoteip to get client IP address when Apache httpd is behind a proxy server or load balancer

Solution Verified - Updated -

Issue

  • We have our Apache httpd web server behind a load balancer. Since the remote address gets changed by that of the balancer, how can we get the actual remote client IP in the logs or configure a Requires ip security directive?

Environment

  • Red Hat Enterprise Linux (RHEL)
    • 7+
  • Red Hat Software Collections (RHSCL)
    • 2.0+
  • Red Hat JBoss Web Server (JWS)
    • 3.0+
  • JBoss Core Services (JBCS)
    • 2.4.23+
  • Apache httpd
    • 2.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content