httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine PICOLET" <>
Subject [users@httpd] Réf. : Re: [users@httpd] location-based virtual hosts ??
Date Wed, 29 Sep 2004 08:09:21 GMT
In fact, all these Applications, installed together on the platform, 
constitue a product, which will be duplicated, and use different DNS name 
(which is why, by the way, I cannot control the DNS mapping ?).

In case of a so-called 'location-based virtal hosting', the inter-app 
links will be fairly simple :
<a href ="/targetApp">

Instead of :
<a href =">
Problem : what is the '' ? 


"Tim Burden" <>

28/09/2004 19:17
Veuillez répondre à users
Remis le : 28/09/2004 19:19

        Pour :  <>
        cc :    (ccc : Antoine PICOLET/DRD/SAGEM)
        Objet : Re: [users@httpd] location-based virtual hosts ??

Why can't you control the DNS mapping? If you could do even a DNS wildcard
* A your.server.ip.addr

then you could do regular name-based vhosting.

I don't see how any solution will get around the problem that for 
links, each will have to know something about how to reach the other app: 
subdomain, a port, a directory name, etc. So what's so bad about port

----- Original Message ----- 
From: Antoine PICOLET
Sent: Tuesday, September 28, 2004 1:00 PM
Subject: [users@httpd] location-based virtual hosts ??


What are the possibilities to implement a kind of 'location-based virtual
hosts', in which virtual hosts are all set on the same IP, DNS name and
port, but are recognized by the first part of the URL context path?

My detailed problem :

I have to configure an Apache HTTP Server 2.0.48, running on a corporate
platform, on which several 'web Applications' have to be integrated. My
problem is :
 * I have no control on these Applications, which come from different
companies. They all have to run in their own Virtual Host for 
flexibility reason. I can however control the Virtual Host definitions and
configuration; the Applications provides the configuration content of 
Virtual Hosts.
 * All these Applications MUST be reached using the same DNS name, since 
cannot control the DNS mapping at all (too bad for standard name-based
virtual hosting, and even for IP-based one)

My current implementation uses a 'port-based virtual hosting' : I create,
for each Application, a virtual host using :

Listen 1234
<VirtualHost *:1234>

//generate some stuff (logging in syslog, accesslog format, suexec
user/group, etc)

//Include Application config here//


However this IS ugly :
 * every Application manager is fighting hard to get the 80 port ; )
 * Application developers cannot know in advance which port they will
receive, since I have to manage the repartition (not two Applications with
the same port). This leads to a big complexity in their clients management
and development (what URL ?)
 * most of all, inter-Application links they have to create are awful, 
these links have to include the whole URL with the port of the target
Application (http://myhost:1234/foo/bar.html). This is really a problem,
since this also means they have to know the hostname of my corporate
platform, which is likely to be duplicated several times, each time with a
different hostname...

So, my ideal solution would be to use some kind of 'location-based' 
hosting, which would resolve all the above-stated problems. In that
solution, every Application will always be accesible from port 80, and can
link to each other with relative links. However this does not exist ...

The only solution I thought of is :

* keep creating port-based virtual hosts, exactly as before
* in the main virual host (port 80), use a set of rewrite rules (which I
haven't figured out exactly, but I know it is feasible) to map a request 
the '/myApplication1' location to the 'http://myhost:1234/' URL.

Obviously, this is really ugly too. It would make me create a lot of ports
that shall never be used directly (how to forbid ?), and it could maybe
create problem with some CGI when they return their URL to the client, 
would maybe include the port...

Can anyone think of another solution allowing several Virtual Hosts to be
created on the same IP address, DNS name and port ?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message