You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ted Neward <tn...@javageeks.com> on 2002/04/12 11:26:47 UTC
Hosting Tomcat from IIS w/ virtual hosts
Anybody out there using Tomcat from IIS running multiple virtual hosts? Can
somebody share the secret magic words necessary to make the connector
recognize the host: headers and route appropriately to different Tomcat
webapps?
Ted Neward
{.NET || Java} Course Author & Instructor, DevelopMentor
(http://www.develop.com)
http://www.javageeks.com/tneward
http://www.clrgeeks.com/tneward
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
RE: Hosting Tomcat from IIS w/ virtual hosts
Posted by John Roth <jo...@providersolutions.net>.
In our environment, we have several virtual IIS hosts, each with it's own
instance of Tomcat. However, we don't use the host headers to determine the
appropriate website; each website has it's own unique IP address. In that
scenario, each instance of Tomcat uses the same IP address as the website,
and Tomcat looks at the same port on each individual address, instead of
0.0.0.0. Below is a copy of two server.xml's used as examples: they have
been stripped down to the relevant tags:
Server.xml from Development server:
-----------------------------------
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-(Development)">
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
address="10.1.2.80" port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0" connectionTimeout="0"/>
<Connector className="org.apache.catalina.connector.http.HttpConnector"
address="10.1.2.80" port="8080" minProcessors="5" maxProcessors="25"
enableLookups="false" redirectPort="8443" acceptCount="10" debug="0"
connectionTimeout="60000"/>
... Appropriate Engine, Host, and Context tags ...
</Service>
</Server>
Server.xml from QA server:
--------------------------
<Server port="8004" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone-(QA)">
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
address="10.1.2.81" port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0" connectionTimeout="0"/>
<Connector className="org.apache.catalina.connector.http.HttpConnector"
address="10.1.2.81" port="8080" minProcessors="5" maxProcessors="25"
enableLookups="false" redirectPort="8443" acceptCount="10" debug="0"
connectionTimeout="60000"/>
... Appropriate Engine, Host, and Context tags ...
</Service>
</Server>
Key Points:
-----------
1. Notice that the shutdown ports (line 1) are different. These always
listen on 0.0.0.0, so each TC instance must have a unique port.
2. Notice the address attribute in the Connector tags. Each TC/IIS site has
a unique IP address
3. Additional changes may be required elsewhere, for example: if using AJP,
the workers.properties for each site need to reflect the appropriate IP
addresses and ports.
4. This environment does use multiple Tomcat instances, so some redefinition
of the TOMCAT_BASE and TOMCAT_HOME environment variables needed to be
changed for each Tomcat service (defined in wrapper.properties), again if
using multiple instances of TC, each running as a service.
Will be monitoring the UG for more information!
John
-----Original Message-----
From: Ted Neward [mailto:tneward@javageeks.com]
Sent: Friday, April 12, 2002 5:27 AM
To: TomcatUserList
Subject: Hosting Tomcat from IIS w/ virtual hosts
Anybody out there using Tomcat from IIS running multiple virtual hosts? Can
somebody share the secret magic words necessary to make the connector
recognize the host: headers and route appropriately to different Tomcat
webapps?
Ted Neward
{.NET || Java} Course Author & Instructor, DevelopMentor
(http://www.develop.com)
http://www.javageeks.com/tneward
http://www.clrgeeks.com/tneward
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>