From: Graham Leggett Date: Tue, 22 Nov 2011 16:50:00 +0000 (+0000) Subject: Update the documentation for the %a and %{c}a logging format strings, and X-Git-Tag: 2.5.0-alpha~7829 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6810567ce9096996c2aeef561fd35d90d2d35dc;p=apache Update the documentation for the %a and %{c}a logging format strings, and update the mod-remoteip documentation in line with the new API. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1205075 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 97fd517df1..417f793522 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -237,6 +237,9 @@ listfunction ::= listfuncname "(" word ")" CONN_LOG_ID The error log id of the connection (see ErrorLogFormat) + CONN_REMOTE_ADDR + The raw IP address of the remote host (see the + mod_remoteip module) diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 7b3cbf5b1b..203c1cb0c8 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -1377,6 +1377,10 @@ in case of an error %a Remote IP-address and port + %{c}a + Actual remote IP-address and port (see the + mod_remoteip module) + %A Local IP-address and port diff --git a/docs/manual/mod/mod_log_config.xml b/docs/manual/mod/mod_log_config.xml index 1943d5c266..907bfda4a2 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -73,6 +73,10 @@ %a Remote IP-address. + %{c}a + Actual remote IP-address and port (see the + mod_remoteip module) + %A Local IP-address. diff --git a/docs/manual/mod/mod_remoteip.xml b/docs/manual/mod/mod_remoteip.xml index 695f4b2205..547542c748 100644 --- a/docs/manual/mod/mod_remoteip.xml +++ b/docs/manual/mod/mod_remoteip.xml @@ -23,9 +23,9 @@ mod_remoteip -Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +Replaces the apparent client remote IP address for the request +with the IP address list presented by a proxies or a load balancer via the +request headers. Base @@ -38,22 +38,19 @@ balancer via the request headers. purposes of authorization and logging, even where that remote host is behind a load balancer, front end server, or proxy server.

-

The module replaces the apparent remote (client) IP/hostname for +

The module overrides the apparent remote (client) IP for the request with the IP address reported in the request header configured with the RemoteIPHeader directive.

Once replaced as instructed, this apparent IP address is then used - for mod_authz_host features - Require host - and Require ip, + for the mod_authz_host + Require ip feature, is reported by mod_status, and is recorded by - mod_log_config %a and %h - directives. It also determines the machine probed for an inetd - identity by mod_ident based on the - IdentityCheck configuration.

+ mod_log_config %a and core + %a format strings. The original remote IP of the connection is + available in the %{c}a format string.

It is critical to only enable this behavior from - intermediate hosts (proxies, etc) which are trusted by this server, since it is trivial for the remote client to impersonate another client. @@ -61,7 +58,6 @@ balancer via the request headers. mod_authz_host mod_status mod_log_config -mod_ident
Remote IP Processing @@ -72,13 +68,12 @@ balancer via the request headers.

mod_remoteip replaces the true remote_ip with the advertised remote_ip as provided by a proxy, for every evaluation of the client that occurs in the - server, and resets the remote_host and remote_logname values to trigger a - fresh dns or ident query of the remote IP address.

+ server.

When multiple, comma delimited remote IP addresses are listed in the header value, they are processed in Right-to-Left order. Processing halts when a given remote IP address is not trusted to present the - preceeding IP address. The header field is updated to this remaining + 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.