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] mod_rewrite/mod_proxy rewrite remote_addr
Date Thu, 22 Jun 2006 15:40:38 GMT
On 6/22/06, Chris Price <cprice@its.to> wrote:
>
>
>         Hi all;
>
> MY SETUP
> ----------
>
> 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" :) )
>
> 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:
http://mail-archives.apache.org/mod_mbox/httpd-users/200606.mbox/%3ce498c1660606130705l54036bf0ne7895cdc10808864@mail.gmail.com%3e

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