This module is used to treat the client which initiated the request as the originating client as identified by httpd for the purposes of authorization and logging, even where that client is behind a load balancer, front end server, or proxy server.
The module overrides the peer IP address for the connection
with the client IP address reported in the request header configured
with the
Once replaced as instructed, this overridden client IP address is
then used for the %a and %a format strings. The underlying peer IP of the connection
is available in the %{c}a format string.
Apache by default identifies the client with the connection's peer_ip value, and the connection remote_host and remote_logname are derived from this value. These fields play a role in authentication, authorization and logging and other purposes by other loadable modules.
mod_remoteip overrides the peer IP of the connection with the advertised client IP as provided by a proxy or load balancer, for the duration of the request. A load balancer might establish a long lived keepalive connection with the server, and each request will have the correct client IP, even though the underlying peer IP address of the load balancer remains unchanged.
When multiple, comma delimited client IP addresses are listed in the header value, they are processed in Right-to-Left order. Processing halts when a given client IP address is not trusted to present the preceding IP address. The header field is updated to this remaining list of unconfirmed IP addresses, or if all IP addresses were trusted, this header is removed from the request altogether.
In overriding the client IP, the module stores the list of intermediate
hosts in a remoteip-proxy-ip-list note, which %{remoteip-proxy-ip-list}n format token.
If the administrator needs to store this as an additional header, this
same value can also be recording as a header using the directive
The
The
The
The '#' hash character designates a comment line, otherwise
each whitespace or newline separated entry is processed identically to
the
The
The
The
The '#' hash character designates a comment line, otherwise
each whitespace or newline seperated entry is processed identically to
the