tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Crowther" <>
Subject RE: 1 jakarta server + multiple ip's
Date Tue, 02 Aug 2005 11:46:13 GMT
> From: 
> I'm configuring a tomcat-server and the server has multiple 
> ip's. I would like
> to setup virtual hosts based on the ip-address. I wouldn't 
> like running
> multiple servers.
> What I've done: I have setup aliases for the possible 
> dns-names of the second
> virtual host (the possible names for one of the ip's). I have 
> also added the ip
> itself to the aliases link.
> However, I don't know how tomcat filter based on these names. 
> The ip-alias seems
> to work, so I'm wondering what tomcat is comparing it with.

Try this.  Beware, this is from the documentation and is untested!
Based on my 5.0.28 installation.

In your server.xml for Tomcat, set up two different Services - copy and
paste the existing chunk of XML for the Service, its Engine (and the
bits inside that) and its Connectors.

Change the appBase of the second Host to the place you want the second
virtual host to find its files.

In the Connectors of each Service, add:


near the port="port" attribute.  THis should cause the Connector to bind
to that IP rather than every IP on the machine.

Hope this helps.

		- Peter

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message