如何在不同端口上的单个tomcat实例上运行不同的应用程序 [英] how to run different apps on single tomcat instance on different ports
问题描述
我想在不同端口上的单个tomcat实例上运行不同的应用程序,
我试过如下server.xml,取自google。请帮我这样做
< service name =Test1>
< connector port =8080maxhttpheadersize =8192maxthreads =10>
enableLookups =falseacceptCount =100
connectionTimeout =10000disableUploadTimeout =true
useBodyEncodingForURI =true/>
< engine name =reciverdefaulthost =localhostjvmroute =host1>
< realm classname =org.apache.catalina.realm.UserDatabaseRealm>
resourceName =UserDatabase/>
< host name =localhostappbase =webappsunpackwars =true>
autoDeploy =falsexmlValidation =false
xmlNamespaceAware =false>
< context docbase =browserpath =/ browseroadable =false>
< service name =test>
< connector port =8081maxhttpheadersize =8192maxthreads =10>
enableLookups =falseacceptCount =1
connectionTimeout =10000disableUploadTimeout =true
useBodyEncodingForURI =trueproxyName =example.ptproxyPort =80/>
< engine name =reciver2defaulthost =example_appjvmroute =host2>
< host name =example_appappbase =test_app / example_appunpackwars =true>
autoDeploy =falsexmlValidation =false
xmlNamespaceAware =false>
< context docbase =example_apppath =/ example_appoadable =false>
Hi,
I would like to run different apps on single tomcat instance on different ports,
I have tried as following on server.xml, which has take from google. Pls help me in doing this
<service name="Test1">
<connector port="8080" maxhttpheadersize="8192" maxthreads="10">
enableLookups="false" acceptCount="100"
connectionTimeout="10000" disableUploadTimeout="true"
useBodyEncodingForURI="true"/>
<engine name="reciver" defaulthost="localhost" jvmroute="host1">
<realm classname="org.apache.catalina.realm.UserDatabaseRealm">
resourceName="UserDatabase" />
<host name="localhost" appbase="webapps" unpackwars="true">
autoDeploy="false" xmlValidation="false"
xmlNamespaceAware="false">
<context docbase="browser" path="/browser" reloadable="false">
<service name="test">
<connector port="8081" maxhttpheadersize="8192" maxthreads="10">
enableLookups="false" acceptCount="1"
connectionTimeout="10000" disableUploadTimeout="true"
useBodyEncodingForURI="true" proxyName="example.pt" proxyPort="80"/>
<engine name="reciver2" defaulthost="example_app" jvmroute="host2">
<host name="example_app" appbase="test_app/example_app" unpackwars="true">
autoDeploy="false" xmlValidation="false"
xmlNamespaceAware="false">
<context docbase="example_app" path="/example_app" reloadable="false">
推荐答案
看看这个:how-to-run-different-apps-on-single-tomcat-instance -behind-different-ports [ ^ ]
这篇关于如何在不同端口上的单个tomcat实例上运行不同的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!