httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] serving multiple application servers under one domain name.
Date Mon, 04 May 2009 23:02:31 GMT
Ahmedkafi wrote:
> 
> Hello everybody,
> 
> I have one domain name (www.example.com).
> 
> I also have 3 different application all running under their own tomcat
> instances. (each application has its own tomcat).
> 
> All 3 instance of tomcat use Apache Server for accepting requests.
> 
> In httpd.conf Each tomcat instance has a corresponding virtual host.
> 
> Everything works fine if I use different domain name for each Virtual host
> for exampel :
> <VirtualHost *:443>
>     ServerName example.com
> </VirtualHost>
> 
> <VirtualHost *:443>
>     ServerName anotherexample.com
> </VirtualHost>
> <VirtualHost *:443>
>     ServerName lastexample.com
> </VirtualHost>
> 
> but what I want to have one domain name www.example.com to serve all three
> applications. for example something like:
> 
> <VirtualHost *:443>
>     ServerName example.com/application1
> </VirtualHost>
> 
> <VirtualHost *:443>
>     ServerName example.com/application2
> </VirtualHost>
> <VirtualHost *:443>
>     ServerName example.com/application3
> </VirtualHost>
> 
> All applications are independent each has its own database,web app etc.
> 
What do you use as a "connector" to pass requests from Apache to Tomcat ?

 >     ServerName example.com/application1
does not work.  A ServerName is a DNS host name.
/application is the URI of a request.

You need something like

 > <VirtualHost *:443>
 >     ServerName example.com
       JkMount /application1 worker1
       JkMount /application1/* worker1
       JkMount /application2 worker2
       JkMount /application2/* worker2
       ...
 > </VirtualHost>

(That's with mod_jk as a connector.)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message