users@glassfish.java.net

Re: Avoiding context in virtual hosts

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 21 Nov 2008 18:20:46 -0800

Hi Charles,

On 11/21/08 01:02 PM, Charles F. Munat wrote:
> I'd like to run multiple websites as applications in a single Glassfish
> domain, but I'd like to avoid putting the contexts in the url.
>
> I can get it set up so that Apache redirects to Glassfish and my hosts
> look like this:
>
> abc.com/abc/
> def.com/def/
>
> But what I (and my clients) want is:
>
> abc.com/
> def.com/
>
> How can I get around this context path issue without running multiple
> instances of Glassfish, one per app, with the app running as the root
> context?

I assume "abc.com" and "def.com" represent different virtual servers?

If so, one way to achieve what you are trying to do would be to deploy
abc.war to abc.com, and also declare it as the default-web-module of
abc.com.
This way, abc.war would be accessible at both the root context ("/")
of abc.com, as well as at its designated context root ("/abc").

You would do the same for def.war and def.com.

Let me know if you have any further questions.

Thanks,

Jan


>
> I tried having Apache redirect to abc.com/abc/, etc. but my apps are
> written in Lift and Lift inserts the context back into all the links, so
> the home page works fine, but all the links go to abc.com/abc/ (which,
> thanks to the redirect in Apache, becomes abc.com/abc/abc/).
>
> Is there a solution?
>
> Any help appreciated.
>
> Chas. Munat
> Seattle
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>