users@glassfish.java.net

Re: Multiple domain names on same IP

From: Shreedhar Ganapathy <Shreedhar.Ganapathy_at_Sun.COM>
Date: Sun, 24 May 2009 12:01:03 -0700

This blog entry should help
http://hobione.wordpress.com/2008/10/02/glassfish-virtual-server/

I am sure other threads in this forum have responses on this as well
since I have seen this question many times.
I think we should add this to our documentation and/or FAQ.


Eirik Brandtzęg wrote:
> Hello.
>
> I want to run one single GlassFish v3 prelude server, and host many
> pages / applications.
> As I might be creating and hosting pages for customers.
> For instance would example.com <http://example.com/> and
> anotherexample.com <http://anotherexample.com/> both point to the same
> IP, but be two completely different applications.
>
> In Apache2 this would be solved by VirtualHosts, but how can I do it
> in GlassFish?
>
> And as I might host for different customers it would be nice if you
> had to use the correct URL
> For instance if I were hosting bankApp on example.com
> <http://example.com/> and mailApp on anotherexample.com
> <http://anotherexample.com/>,
> I don't want example.com/mailApp <http://example.com/mailApp> or
> anotherexample.com/bankApp <http://anotherexample.com/bankApp> to work...
>
> Can anyone point me in the right direction here?
>
> Thanks
>
> --
> Eirik Brandtzęg