httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Passing along ip info while reverse proxying
Date Sat, 02 Dec 2006 03:06:31 GMT
On 12/1/06, sniedermeyer@cob.org <sniedermeyer@cob.org> wrote:
> I've install apache as a reverse proxy server and was wondering if there
> was a way to preserve the site visitor's ip and pass it along to the
> back-end servers so they can log it.  Once I put the reverse proxy server
> in front of our web apps, the web apps started to only log requested from
> the reverse proxy server's ip address.  I tried the ProxyPreserveHost
> directive and thought that would accomplish this.  However, when I added
> this directive in each of my vhost configs, they stopped working (wouldn't
> pull any pages up).  Any ideas on how to configure this?  Or is there
> another directive I should be looking at?

ProxyPreserveHost is for the Host HTTP request header.  It has nothing
to do with the remote (client) IP address.

For that, your app can look at the contents of the X-Forwarded-For
request header, which the proxy automatically adds with the source IP.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message