perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Sysoev ...@rambler-co.ru>
Subject Re: PerlPassEnv and Proxies
Date Mon, 18 Feb 2002 14:51:56 GMT
On Mon, 18 Feb 2002, Andrew Green wrote:

> I'm using a typical dual-server combination for mod_perl content on a
> selection of sites.  Requests go to the vanilla Apache and a
> mod_rewrite/mod_proxy combo forward them on to the mod_perl Apache.
> 
> As part of this, I'm trying to allow a prefix to the URL path to set an
> environment variable I can then use in my mod_perl programs to determine
> databases, templates etc.
> 
> The vanilla httpd.conf features a line thus:
> 
>    RewriteRule ^/(test|access|ewok)/(.*)$
>    http://spare.article7.co.uk:8080/page/$2 [P,E=A7_FRAMEWORK:$1,L]
> 
> (ignoring the wrapping).  I also set PerlPassEnv A7_FRAMEWORK in my
> mod_perl httpd.conf -- but that environment variable always remains
> undef. The order of the P,E,L flags doesn't seem to make a difference.
> 
> I appreciate that this is perhaps more of a mod_proxy issue than a
> mod_perl one, but I suspect I'm not alone in having tried something
> similar.  I haven't found anything in the guide that deals with this
> specifically (I really don't want to append the information as a query
> string), but if I've overlooked anything, I'd be very happy to be
> corrected.

You set A7_FRAMEWORK in vanilla Apache so mod_perl Apache does
not receive it.

You can try my mod_accel module. It send original URL to backend in
X-URL header. Also you do not need to use mod_rewrite if you want
to exclude some URL from proxing.

Igor Sysoev


Mime
View raw message