On Wed, 1 Aug 2001 13:12:44 +0200
"Issac Goldstand" <[EMAIL PROTECTED]> wrote:

> > based on the earlier discussion about detecting https :)
> 
> That will take care of standard http/https, but what if we have a custom
> client connecting on weird ports _without_ putting the port in the URL?
> Wouldn't it make sense to just take $ENV{SERVER_PORT} and join() _that_ to
> make the unique filename?  That'll take care of all the weird server
> combinations possible including SSL, as only one listening socket can
> physically bind to a port.  It'll even transparently take care of weird
> back-end server problems, as no matter how many servers seem to be on
> http://frontend:80, the backends MUST be unique combinations of either
> different hostnames or different ports...

Agreed here.

We've tried to set up development/production environment in the
same one server with config like following (simplified):

  Listen 80    # production
  Listen 8080  # development

  <VirtualHost _default_:80>
  DocumentRoot /home/production
  </VirtualHost>

  <VirtualHost _default_:8080>
  DocumentRoot /home/development
  </VirtualHost>


Yeah, this will lead to mixups of the following two URLs, which we
don't want.

  http://hostname/foo.cgi      = /home/prodution/foo.cgi
  http://hostname:8080/foo.cgi = /home/environment/foo.cgi
 

Patch follows, or do we have to make our own PortAwareRegistry
which inherits from Apache::RegistryNG ?

Thanks.


--- Registry.pm.orig    Wed Aug 15 19:17:42 2001
+++ Registry.pm Wed Aug 15 19:18:19 2001
@@ -70,7 +70,7 @@

        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 "", $name, $r->get_server_port, $script_name if $name;
        }

        # Escape everything into valid perl identifiers



--
Tatsuhiko Miyagawa
mailto:[EMAIL PROTECTED]

Reply via email to