tomcat 同時(shí)開(kāi)多個(gè)端口

          tomcat要同時(shí)開(kāi)多個(gè)端口只要配置conf文件夾下面的server.xml增加Service節(jié)點(diǎn)就可以了,如下我多開(kāi)了個(gè)8083端口,同時(shí)我把Catalina文件夾多拷貝了一份另存為Catalina2
          <Server port="8005" shutdown="SHUTDOWN" debug="0">


          ? <!-- Comment out these entries to disable JMX MBeans support -->
          ? <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
          ??????????? debug="0"/>
          ? <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
          ??????????? debug="0"/>

          ? <!-- Global JNDI resources -->
          ? <GlobalNamingResources>

          ??? <!-- Test entry for demonstration purposes -->
          ??? <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

          ??? <!-- Editable user database that can also be used by
          ???????? UserDatabaseRealm to authenticate users -->
          ??? <Resource name="UserDatabase" auth="Container"
          ????????????? type="org.apache.catalina.UserDatabase"
          ?????? description="User database that can be updated and saved">
          ??? </Resource>
          ??? <ResourceParams name="UserDatabase">
          ????? <parameter>
          ??????? <name>factory</name>
          ??????? <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
          ????? </parameter>
          ????? <parameter>
          ??????? <name>pathname</name>
          ??????? <value>conf/tomcat-users.xml</value>
          ????? </parameter>
          ??? </ResourceParams>

          ? </GlobalNamingResources>

          ? <!-- Define the Tomcat Stand-Alone Service -->
          ? <Service name="Catalina">

          ??? <!-- Define a non-SSL Coyote HTTP/1.1 Connector on the port specified
          ???????? during installation -->
          ??? <Connector
          port="8081"?????????????? maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
          ?????????????? enableLookups="false" redirectPort="8443" acceptCount="100"
          ?????????????? debug="0" connectionTimeout="20000"
          ?????????????? disableUploadTimeout="true" />

          ??? <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
          ??? <Connector port="8009"
          ?????????????? enableLookups="false" redirectPort="8443" debug="0"
          ?????????????? protocol="AJP/1.3" />
          ????????
          ??? <!-- Define the top level container in our container hierarchy -->
          ??? <Engine name="Catalina" defaultHost="localhost" debug="0">
          ????? <!--
          ????? <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
          ????? -->

          ????? <!-- Global logger unless overridden at lower levels -->
          ????? <Logger className="org.apache.catalina.logger.FileLogger"
          ????????????? prefix="catalina_log." suffix=".txt"
          ????????????? timestamp="true"/>


          ????? <!-- This Realm uses the UserDatabase configured in the global JNDI
          ?????????? resources under the key "UserDatabase".? Any edits
          ?????????? that are performed against this UserDatabase are immediately
          ?????????? available for use by the Realm.? -->
          ????? <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
          ???????????????? debug="0" resourceName="UserDatabase"/>

          ????? <!-- Define the default virtual host -->
          ????? <Host name="localhost" debug="0" appBase="webapps"
          ?????? unpackWARs="true" autoDeploy="true">


          ??????? <Logger className="org.apache.catalina.logger.FileLogger"
          ???????????????? directory="logs"? prefix="localhost_log." suffix=".txt"
          ??????????? timestamp="true"/>

          ??????? <!--
          ????????? <Context path="" docBase="ROOT" debug="0">
          ??????? -->
          ????? </Host>

          ??? </Engine>

          ? </Service>
          ?
          ??? <Service name="Catalina2">

          ??? <Connector
          port="8083"?????????????? maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
          ?????????????? enableLookups="false" redirectPort="8443" acceptCount="100"
          ?????????????? debug="0" connectionTimeout="20000"
          ?????????????? disableUploadTimeout="true" />


          ??? <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
          ??? <Connector port="8010"
          ?????????????? enableLookups="false" redirectPort="8443" debug="0"
          ?????????????? protocol="AJP/1.3" />

          ????????
          ??? <!-- Define the top level container in our container hierarchy -->
          ??? <Engine name="Catalina2" defaultHost="localhost" debug="0">


          ????? <!-- Global logger unless overridden at lower levels -->
          ????? <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="localhost" debug="0" appBase="webapps"
          ?????? unpackWARs="true" autoDeploy="true">


          ??????? <Logger className="org.apache.catalina.logger.FileLogger"
          ???????????????? directory="logs"? prefix="localhost_log." suffix=".txt"
          ??????????? timestamp="true"/>

          ????? </Host>

          ??? </Engine>

          ? </Service>

          </Server>

          posted on 2006-12-07 14:23 JGAO編程隨筆 閱讀(2559) 評(píng)論(0)  編輯  收藏


          只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          <2006年12月>
          262728293012
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          導(dǎo)航

          統(tǒng)計(jì)

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 光山县| 天气| 宁远县| 黄大仙区| 嵊泗县| 虎林市| 盖州市| 密云县| 福贡县| 泗洪县| 酒泉市| 浦城县| 清新县| 周至县| 赣榆县| 延寿县| 淳安县| 湘阴县| 巫溪县| 年辖:市辖区| 固镇县| 乌拉特中旗| 磐石市| 济阳县| 晋中市| 红桥区| 肇源县| 镇江市| 嘉义市| 东源县| 永新县| 汝城县| 乌兰浩特市| 高清| 桂阳县| 湄潭县| 临城县| 建昌县| 上林县| 博乐市| 波密县|