Re: [users@httpd] mod_rewrite/mod_proxy rewrite remote_addr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/22/06, Chris Price <cprice@xxxxxx> 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@xxxxxxxxxxxxxx%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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux