On Friday 16 September 2005 02:05, Mark Moseley wrote:
> Greetings. I've been scouring the list and the net for a solution for this
> but my apologies in advance if I didn't get the search terms right and
> missed a RTFM answer.
>
> I work for a web hosting company and we recently purchased a pair of
> BigIPs. These have the ability to terminate SSL connections and then send
> regular HTTP to the backend servers (running Apache 1.3.29/mod_perl 1.29
> and making heavy use of transhandlers).
>
> My question for the list is this:
> Is there any mod_perl-ish to pretend that a request is coming through SSL?
> The main issue I'm facing is that I've got a couple hundred thousands
> users, many using mod_rewrite in .htaccess files (and a potentially very
> very large number and out of my control so modifying them is not an
> option). Since the BigIP is retransmitting the request as HTTP, the scheme
> that the backend server is using is 'http', not 'https'. So if a redirect
> is generated via mod_rewrite, it's redirecting to http://the/url/etc, not
> https://the/url/etc. Presumably people doing redirects via PHP would have
> the same issue. However the URL scheme looks to be somewhat inaccessible
> from $r and if I parse it with Apache::URI and use the scheme method there,
> I don't know of a $r method to set the URI to the modified URI object.
>
> I've tried setting $ENV{ HTTPS } to 'on', but that didn't help.
>
> Anybody know of a method I might be missing that would help me out?
> Basically what I'm trying to accomplish is if I see a request coming in on
> port 443, I want to set $r->method( "https" ) -- and I know there's no
> method called this, but for explanation sake ;)

Maybe in it is sufficient to set $r->subprocess_env(HTTPS=>'on') in a 
PostReadRequest handler. Maybe even PerlSetEnv outside any <Location> or 
<Directory> might help. This will also set environment variables very early. 
$ENV{HTTPS} is not good.

Torsten

Attachment: pgpvmi7s0OCV7.pgp
Description: PGP signature

Reply via email to