users@glassfish.java.net

Re: Virtual Servers & Listeners

From: <glassfish_at_javadesktop.org>
Date: Mon, 10 Sep 2007 10:17:07 PDT

You're talking about virtual hosts.

Specifically you want to know if you can have:

www.example.com IP 123.123.123.123 port 80
www.anotherexample.com IP 123.123.123.123 port 80

Yes?

Simple virtual hosting?

That's easy.

You just go to the GF Admin page:

Configuration -> HTTP Service -> Virtual Servers

There, you create and name the virtual server, and then enter a comma seperated list of hosts. Note, that there can be no spaces between the commas and the hosts (I filed an issue on that).

Then assign the host a listener (http-listener-1 for example).

This works like a champ.

Note, however, that during deployment you must specify the specific virtual server to deploy against.

I don't know of a way to configure the virtual server in, say, the sun-web.xml file (I may be wrong).

But, yea, this works like a champ (at least it does in GF v2). I use it everyday.
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=234706