Re: [squid-users] let squid to request the page using client IP?

From: Brendan Kearney <bpk678_at_gmail.com>
Date: Thu, 07 Aug 2014 20:31:11 -0400

On Fri, 2014-08-08 at 11:48 +1200, Jason Haar wrote:
> Googling "apache x-forwarded-for" led me to mod_extract_forwarded
>
> http://www.openinfo.co.uk/apache/
>

from the apache mod_proxy page:

Reverse Proxy Request Headers

When acting in a reverse-proxy mode (using the ProxyPass directive, for
example), mod_proxy_http adds several request headers in order to pass
information to the origin server. These headers are:

X-Forwarded-For
    The IP address of the client.
X-Forwarded-Host
    The original host requested by the client in the Host HTTP request
header.
X-Forwarded-Server
    The hostname of the proxy server.

Be careful when using these headers on the origin server, since they
will contain more than one (comma-separated) value if the original
request already contained one of these headers. For example, you can use
%{X-Forwarded-For}i in the log format string of the origin server to log
the original clients IP address, but you may get more than one address
if the request passes through several proxies.

See also the ProxyPreserveHost and ProxyVia directives, which control
other request headers.

looks like all you need is mod_proxy_http.
Received on Fri Aug 08 2014 - 00:29:40 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 08 2014 - 12:00:04 MDT