On Tue, 31 Jul 2001, Chris Rodgers wrote:

> Thanks for that. However, I've already seen this. The problem is that I'm
> requesting pages at:
>
> http://my.server.com/perl/blah.pl
>
> and also
>
> https://my.server.com/perl/blah.pl
>
> Now these should be different scripts, and Apache is set up with a
> completely different document and perl root for the http and https
> servers. Unfortunately, these still get confused, even with the
> NameWithVirtualHost code. Hence, I thought of hacking the .pm files to
> include the server port as well as the name in the uniquely generated
> namespace.
>
> Any other ideas??

Hmm, I think you are the first one to hit this issue. Try this (untested):

--- ./lib/Apache/Registry.pm.orig       Wed Aug  1 11:06:49 2001
+++ ./lib/Apache/Registry.pm    Wed Aug  1 11:11:04 2001
@@ -70,7 +70,8 @@

        if ($Apache::Registry::NameWithVirtualHost &&
$r->server->is_virtual) {
            my $name = $r->get_server_name;
-           $script_name = join "", $name, $script_name if $name;
+           $script_name = join "", (exists $ENV{HTTPS}?'https':''),
+                $name, $script_name if $name;
        }

        # Escape everything into valid perl identifiers

based on the earlier discussion about detecting https :)

> Yours,
>
> Chris Rodgers
> [EMAIL PROTECTED]
>
> On Tue, 31 Jul 2001, Stas Bekman wrote:
>
> > On Tue, 31 Jul 2001, Chris Rodgers wrote:
> >
> > > Hi,
> > >
> > > I'm running Apache with mod_perl and mod_ssl. ("Apache/1.3.20 (Unix)
> > > mod_perl/1.25 mod_ssl/2.8.4 OpenSSL/0.9.5a" to be precise.)
> > >
> > > I am listening on both port 80 (HTTP) and port 443 (HTTPS) and serving perl
> > > scripts. There are two separate vhosts on the two ports -> i.e. entirely
> > > different websites, but only one httpd (and associated set of children).
> > >
> > > Now, this works fine, except that if I try to access a script with the same
> > > name on the http site and the https site, I get the WRONG version sometimes.
> > > I think that this is because mod_perl is only using the server name (and not
> > > the port / protocol) when it builds its table for caching scripts.
> > >
> > > Does anyone know how to fix this? I was thinking of editing all the .pm
> > > files for mod_perl around where they refer to $NameWithVirtualHost - and to
> > > add the port onto the begining of the unique identifier which is used to
> > > form the namespace for each script. Would this work - or might it break
> > > something else??!
> > >
> > > Any hints/tips would be greatly appreciated!
> >
> > http://perl.apache.org/guide/multiuser.html#Virtual_Hosts_in_the_guide
> >
> >
> > _____________________________________________________________________
> > Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
> > http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
> > mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
> > http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
> >
> >
> >
>



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Reply via email to