users@glassfish.java.net

Apache, mod_jk and VirtuellServers

From: Johannes Hammoud <hammoud_at_web.de>
Date: Tue, 19 Sep 2006 10:28:27 +0200

Hi,


trying to set up the desired environment i get stucked to run several applications in context root.
Currently i rent a managed server, the hoster installed the connection between Apache and SJSAS PE 9 and my first application is running well.


But i need to run several applications with different domains on same host.
Problem is that it must be possible to call all application without Context in URL (SEO optimized).

domain1.tld/function.html (instead domain1.tld/application1/function.html)
domain2.tld/function.html (instead domain2.tld/application2/function.html)
...


So i tried to use Virtuell Hosts to forward request to the applications depending on domainnames:
Application1: ContextRoot= /Application1
Application2: ContextRoot= /Application2

VirtualServer1: Hosts=domain1.tld, DefaultWebModul=Application1
VirtualServer2: Hosts=domain2.tld, DefaultWebModul=Application2


Configure application as default module will be deployed in context root or?
Seems to me, that all requests from Apache, will only be forward to the first found Virtual Server!
So its not possible do forward requests to Application2.

Tried/Search a lot, would be nice if anybody just could say me, if its possible.
Otherwise i have to do some more "dirty" with mod_rewrite and own sessionid management.


thanx,
J. Hammoud