tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Tellefson <...@bizdash.com>
Subject Context mapping question
Date Thu, 28 Oct 2004 04:58:59 GMT

I have tomcat 5.0.28 serving four apps, two in one service and two in another. 
Each Service is on a different IP and DNS is configured correctly. A stripped 
down version of my server.xml is show below.

With this configuration, I can browse to:

   https://ws.host.com:8443/app3

and it responds as app3.  I expected that app3 would only be available as:

  https://bd.host.com:8443/app3

It does not work the other way around, i.e., 

  http://bd.host.com:8080/

does not bring up app1.

Why is app3 (in the "secure" service) available via the "open" service?

Before I dive into the Tomcat code to see how these are mapped, maybe one of 
you can point out the error in my approach.


<Server port="8005" shutdown="SHUTDOWN" debug="9">

	<Service name="open">

		<Connector port="8080" maxThreads="150" minSpareThreads="25"
			maxSpareThreads="75" enableLookups="false" acceptCount="100"
			debug="7" connectionTimeout="20000" disableUploadTimeout="true" />

		<Engine name="open" defaultHost="ws.host.com">
			<Logger className="org.apache.catalina.logger.FileLogger" />

			<Host name="ws.host.com" appBase="webapps">

				<Context path="/" docBase="app1" debug="9"
					reloadable="true" crossContext="true" swallowOutput="true">
				</Context>
			</Host>

			<Host name="doc.host.com" appBase="webapps">

				<Context path="/app2" docBase="app2" debug="9"
					reloadable="true" crossContext="true" swallowOutput="true">
				</Context>
			</Host>
		</Engine>
	</Service>

	<Service name="secure">

		<!-- Define a SSL Connector on port 47474 -->
		<Connector port="8443" maxThreads="150" minSpareThreads="25"
			maxSpareThreads="75" enableLookups="false"
			disableUploadTimeout="true" acceptCount="100" debug="9"
			scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
			keystoreFile="/home/tomcat/server/conf/keystore.kdb" />

		<Engine name="secure" defaultHost="bd.host.com">
			<Logger className="org.apache.catalina.logger.FileLogger" />

			<Host name="bd.host.com" appBase="webapps">

				<Context path="/app3" docBase="app3" debug="9"
					reloadable="true" crossContext="true" swallowOutput="true">
				</Context>

				<Context path="/app4" docBase="app4" debug="9"
					reloadable="true" crossContext="false" swallowOutput="true">
				</Context>
			</Host>
		</Engine>
	</Service>
</Server>
-- 

Bob Tellefson
BizDash LLC
bob@BizDash.com
http://www.BizDash.com
 

---------------------------------------------------------------------
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