Hello,
I'm totally new to Tomcat and I have been searching the net for a little while
now looking for info on configuring tomcat to host multiple apps on different
ports and different web roots. I have come across some posts on running
multiple instances which might be the right thing for me I'm still not sure.
So here is what I'm looking to configure, I just dont know if it's the right
way.
tomcat
- webapps
-- appWebServices
-- appMainUserSite
I would like to run the app "appWebServices" on port 3100 with the docBase to
be "tomcat/webapps/appWebServices". I would also like the app to support 500
simultaneous connections. Now I would like to run the app "appMainUserSite" on
port 3200 with the docBase to be "tomcat/webapps/appMainUserSite". I would also
like the app to support 100 simultaneous connections.
Now this configuration seems to work, but since I'm fairly new to this I
thought I would get a second & third opinion. So is what I'm doing the right
solution or is there a better one, like multiple instances etc.
Thanks,
tom
server.xml
<Server port="8005" shutdown="SHUTDOWN">
...
<Service name="Catalina">
...
</Service>
<!-- My Services Config -->
<!-- Web Services -->
<Service name="myWebService">
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="500" minSpareThreads="10"/>
<Connector executor="tomcatThreadPool" port="3100" redirectPort="3144"
protocol="HTTP/1.1" connectionTimeout="300"
enableLookups="false"
disableUploadTimeout="true" maxHttpHeaderSize="8192" URIEncoding="UTF-8" />
<Engine name="myWebService" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps" unpackWARs="false"
autoDeploy="false"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="appWebServices"/>
</Host>
</Engine>
</Service>
<!-- Main Site -->
<Service name="mySite">
<Executor name="mySiteThreadPool" namePrefix="catalina-exec-"
maxThreads="100" minSpareThreads="10"/>
<Connector executor="mySiteThreadPool" port="3200" protocol="HTTP/1.1"
connectionTimeout="300" />
<Engine name="mySite" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps" unpackWARs="false"
autoDeploy="false"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="appMainUserSite" />
</Host>
</Engine>
</Service>
</Server>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]