Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 65074 invoked from network); 22 Jun 2006 15:41:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Jun 2006 15:41:11 -0000 Received: (qmail 63398 invoked by uid 500); 22 Jun 2006 15:41:00 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 63382 invoked by uid 500); 22 Jun 2006 15:41:00 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 63371 invoked by uid 99); 22 Jun 2006 15:41:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2006 08:41:00 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jslive@gmail.com designates 66.249.82.198 as permitted sender) Received: from [66.249.82.198] (HELO wx-out-0102.google.com) (66.249.82.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2006 08:40:59 -0700 Received: by wx-out-0102.google.com with SMTP id t10so338571wxc for ; Thu, 22 Jun 2006 08:40:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kRrzDNL5iaGzaBwCyiItQ0fTmoQg4mFqss6hFyQQ4bUWbVAaswYu01RI+tGtiGU4gJUW5M0mOT1q/DX+X8S9fYffnAEyTHc3pgAts9mQ3qpKE/gCXW9XZiNo5ZxHbAt0pToJGQSecnuR3xytuyjmf3teXHX+2LEWSyZERNINDC0= Received: by 10.70.20.15 with SMTP id 15mr3336702wxt; Thu, 22 Jun 2006 08:40:38 -0700 (PDT) Received: by 10.70.92.6 with HTTP; Thu, 22 Jun 2006 08:40:38 -0700 (PDT) Message-ID: Date: Thu, 22 Jun 2006 11:40:38 -0400 From: "Joshua Slive" Sender: jslive@gmail.com To: users@httpd.apache.org In-Reply-To: <449AB790.90905@its.to> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <449AB790.90905@its.to> X-Google-Sender-Auth: 2cd6e52bff7140b1 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] mod_rewrite/mod_proxy rewrite remote_addr X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 6/22/06, Chris Price 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 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