users@glassfish.java.net

Avoiding context in virtual hosts

From: Charles F. Munat <chas_at_munat.com>
Date: Fri, 21 Nov 2008 13:02:34 -0800

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