tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barnett, Brian W." <brian.barn...@pearson.com>
Subject RE: Multiple IP addresses
Date Mon, 05 Sep 2005 22:44:26 GMT
Thanks Peter. I did what you suggested, and I think it is *almost* working.

I have one NIC in my server and I added a second IP address on it. I tested
it out, and I was able by ping both IP addresses.

I then modified the server.xml file to have two <service> elements here they
are:

<Service name="WSSService"> 
	<Connector port="80" 
		maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
		enableLookups="false" redirectPort="443" acceptCount="100" 
		debug="0" connectionTimeout="20000" 
		disableUploadTimeout="true" 
		address="166.70.163.138" /> 
	<Connector port="443" 
		maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
		enableLookups="false" disableUploadTimeout="true" 
		acceptCount="100" debug="0" scheme="https" secure="true" 
		clientAuth="false" sslProtocol="TLS" 
		address="166.70.163.138" /> 
	<Connector port="8009" 
		enableLookups="false" redirectPort="443" debug="0" 
		protocol="AJP/1.3" 
		address="166.70.163.138" /> 
	<!-- Put context.xml files in ../conf/[enginename]/[hostname]
../conf/Catalina/wss --> 
	<Engine name="Catalina" defaultHost="wss" debug="0"> 
		<Logger className="org.apache.catalina.logger.FileLogger" 
			prefix="catalina_log." suffix=".txt" 
			timestamp="true"/> 
		<Realm
className="org.apache.catalina.realm.UserDatabaseRealm" 
			debug="0" resourceName="UserDatabase"/> 
		<Host name="wss" debug="0" appBase="wss-webapps" 
			unpackWARs="true" autoDeploy="true" 
			xmlValidation="false" xmlNamespaceAware="false"> 
			<Logger
className="org.apache.catalina.logger.FileLogger" 
				directory="logs" prefix="wss_log."
suffix=".txt" 
				timestamp="true"/> 
		</Host> 
	</Engine> 
</Service> 

<Service name="ScrumService"> 
	<Connector port="80" 
		maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
		enableLookups="false" redirectPort="443" acceptCount="100" 
		debug="0" connectionTimeout="20000" 
		disableUploadTimeout="true" 
		address="166.70.163.140" /> 
	<Connector port="443" 
		maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
		enableLookups="false" disableUploadTimeout="true" 
		acceptCount="100" debug="0" scheme="https" secure="true" 
		clientAuth="false" sslProtocol="TLS" 
		address="166.70.163.140" /> 
	<Connector port="8009" 
		enableLookups="false" redirectPort="443" debug="0" 
		protocol="AJP/1.3" 
		address="166.70.163.140" /> 
	<!-- Put context.xml files in ../conf/[enginename]/[hostname]
../conf/Catalina/scrum --> 
	<Engine name="Catalina" defaultHost="scrum" debug="0"> 
		<Logger className="org.apache.catalina.logger.FileLogger" 
			prefix="catalina_log." suffix=".txt" 
			timestamp="true"/> 
		<Realm
className="org.apache.catalina.realm.UserDatabaseRealm" 
			debug="0" resourceName="UserDatabase"/> 
		<Host name="scrum" debug="0" appBase="scrum-webapps" 
			unpackWARs="true" autoDeploy="true" 
			xmlValidation="false" xmlNamespaceAware="false"> 
			<Logger
className="org.apache.catalina.logger.FileLogger" 
				directory="logs" prefix="scrum_log."
suffix=".txt" 
				timestamp="true"/> 
		</Host> 
	</Engine> 
</Service> 

I can successfully hit all the web apps on 166.70.163.138, the first
<service> listed, but I'm not getting anything on the second one. I've
commented out the first one and restarted Tomcat, but still can't get
anything on 166.70.163.140.

I put the Tomcat manager web app in both web app folders but only can hit it
in one. Anybody have any suggestions on how to troubleshoot this?

TIA,
Brian Barnett

-----Original Message-----
From: Peter Crowther
To: Tomcat Users List
Sent: 9/2/2005 4:27 AM
Subject: RE: Multiple IP addresses

> From: Barnett, Brian W. [mailto:brian.barnett@pearson.com] 
> I seem to remember when I was working with IIS some years 
> ago, I could map
> multiple IP addresses to one instance of IIS, i.e., IIS could service
> multiple web sites for me, each web site having it's own, 
> unique IP address.
> Is there a way to do this with Tomcat stand alone or is 
> Apache Web Server or
> IIS required?

Works fine with Tomcat.  Modify your server.xml to have multiple
Services, each with its own set of innards like Connectors and Hosts,
and each with its own appbase.  Then use

	address="numeric.ip.address.required"

in each of the connector attributes to force a bind to just that IP
address for that connector.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html for the
details on Connector.

		- Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message