perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Green <and...@article7.co.uk>
Subject Re: PerlPassEnv and Proxies
Date Mon, 18 Feb 2002 19:08:01 GMT
In article <Pine.LNX.4.33.0202181740080.21639-100000@windsor.sixt.de>,
   Hans Juergen von Lengerke <lengerkeh@sixt.de> wrote:

> I agree, its a big hack, but it works :-)

Thanks to both of you for pointing me in the right direction.  I guess
it's obvious, really, that environment variables don't get passed along
proxies.  Blast.  =o)

I've implemented a variation on your hack, and I'm very happy with it. 
It also inspired me to get a further variation going as a method of
getting the original remote host without the trouble of installing
mod_proxy_add_forward.  In the vanilla Apache:

     RewriteRule ^/(.*)$
     http://domain:port/%{REMOTE_HOST}/$1 [P,L]

...and in the mod_perl one:

     RewriteRule ^/([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/(.*)$
     /$2 [E=ORIGINAL_REMOTE_HOST:$1,L]

Probably best to combine this with

     Order Deny,Allow
     Deny from all
     Allow from localhost

To avoid *really* trivial IP spoofing!

Many thanks again,
Andrew.

-- 
                   ::    
      article seven      Andrew Green
 automatic internet      andrew@article7.co.uk | www.article7.co.uk

Mime
View raw message