httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] mod_rewrite/mod_proxy rewrite remote_addr
Date Thu, 22 Jun 2006 15:40:38 GMT
On 6/22/06, Chris Price <> wrote:
>         Hi all;
> ----------
> Linux RHEL4, i386, httpd-2.0.46-56.ent
>         I've recently started using mod_rewrite in conjunction with mod_proxy
> to rewrite+proxy certain urls to a cluster of backend servers;
> RewriteRule ^/foo(/?.*)$ proxy:https://${server:cluster}/foo$1 [qsa]
>         Where 'cluster' is a list of IP's seperated by '|' in a RewriteMap
> directive earlier.
>         This solution works great, except for one problem (see "THE PROBLEM" :) )
> -----------
>         My backend servers themselves make internal code calls to 3rd party
> modules to substantiate the geographical location of the originating
> client request based on the value of REMOTE_ADDR. Before I had
> mod_rewrite/mod_proxy this service worked fine when the world accessed
> my (now) backend servers directly. Of course with my apache layer in
> between the originating client and my backend servers, my backend
> servers always see REMOTE_ADDR set to the value of my apache servers.
> Since I don't own or have access to the aforementioned 3rd party
> modules, I would like to try and find a way to dynamically remap the
> originating clients IP into the http header REMOTE_ADDR variable that
> the apache mod_proxy sends to the backend server.
>         Can mod_proxy/mod_rewrite/mod_??? dynamically override the value of
> REMOTE_ADDR with the originating clients IP being sent thru an apache
> mod_proxy rule?

This question was recently asked and answered:


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message