users@glassfish.java.net

Re: Apache, mod_jk and VirtuellServers

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 19 Sep 2006 18:59:53 -0700

Hi Johannes,

sorry for the delay....

Johannes Hammoud wrote:
> 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?

Will be deployed and mapped as /. So http://virtualserver1/ should
trigger your /Application1.

> 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.

It should. Have you try with Tomcat to see if you are able to force
Apache to do what your want (just a test :-)). If that doesn't work,
then we know the problem is with your configuration.

On another topic, why do you need to do it using Apache? You can do it
directly in GlassFish by properly defining the hosts value of the
virtual-server.

Thanks

-- Jeanfrancois

>
>
> thanx,
> J. Hammoud
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>