geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <>
Subject Re: Virtual Hosts
Date Mon, 16 Jan 2006 20:52:43 GMT
OK, let me try to concoct a still more explicit example, to help me
understand what's going on in Tomcat.

Let's say your box as one network card, and, of course, the loopback address:


With 2 IPs assigned to the network card:


And each of those IPs has two host names assigned:


Now we have one Tomcat listener by default:

Listener HTTP @

And we have one Tomcat Host by default:

Host TomcatHost, name=localhost

So as far as I can tell, in our default configuration, since the only
Tomcat Host GBean is given a name parameter of "localhost", we only
support virtual hosting for "localhost" without additional user
configuration (deploying Host GBeans)?  Or do we only support any
traffic at all to "localhost"?  I haven't tried Tomcat from a remote

Anyway, let's say I have two applications, "Poker" and "Pinochle", and
I want Poker to be available on and,
and I want Pinochle to be available on and  Is that possible?  If so, what Host objects would
need to be added, and how would the Poker and Pinochle applications be
bound to them?  And is there any explicit relationship between
Listener and Host other than them being in the same Container?


On 1/16/06, Jeff Genender <> wrote:
> David Jencks wrote:
> > To clarify, the tomcat and jetty interpretations of the multiple virtual
> > host elements in an ejb web service plan are completely unrelated:
> > -- jetty: the vh elements are actually used as virtual host names
> > -- tomcat: the first vh element if present is used to find a tomcat host
> > object, whose name has nothing to do with any aliases/virtual host names.
> I don't agree here.  According to the Tomcat doc, the Host name is
> "Network name of this virtual host, as registered in your Domain Name
> Service server."  So it is a virtual host name.  Where I think where the
> code can be expanded is searching the alias name for a match in case the
> name is not the same as the VH.  This is probably a good thing to add.
> Jeff

View raw message