tomact配置多个端口

Tomcat 是一个小型的轻量级应用服务器,是开发和调试JSP 程序的首选。因为Tomcat 技术先进、性能稳定,而且免费,因而深受Java 爱好者的喜爱并得到了部分软件开发商的认可,成为目前比较流行的Web 应用服务器。

<?xml version='1.0' encoding='utf-8'?>  
<Server port="8005" shutdown="SHUTDOWN">  
  
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />  
  <Listener className="org.apache.catalina.core.JasperListener" />  
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />  
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />  
  <GlobalNamingResources>  
    <Resource name="UserDatabase" auth="Container"  
              type="org.apache.catalina.UserDatabase"  
              description="User database that can be updated and saved"  
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"  
              pathname="conf/tomcat-users.xml" />  
  </GlobalNamingResources>  
  
  <Service name="Catalina">  
    
    <Connector port="80" protocol="HTTP/1.1"   
               connectionTimeout="20000"   
               redirectPort="8443" />  
  
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />  
  
    <Engine name="Catalina" defaultHost="localhost">  
  
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"  
             resourceName="UserDatabase"/>  
      <Host name="localhost"  appBase="webapps"  
            unpackWARs="true" autoDeploy="true"  
            xmlValidation="false" xmlNamespaceAware="false">  
            <Context path="" docBase="D:\Tomcat 6.0\webapps\ROOT"   
debug="0" reloadable="true">  
            </Context>  
      </Host>  
    </Engine>  
  </Service>  
  <!--注意Service name、Engine name、appBase,
当然了,端口号别忘了修改,以免重复。-->
  <Service name="Extra">  
    
    <Connector port="8080" protocol="HTTP/1.1"   
               connectionTimeout="20000"   
               redirectPort="8443" />  
  
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />  
  
    <Engine name="Extra" defaultHost="localhost">  
  
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"  
             resourceName="UserDatabase"/>  
      <Host name="localhost"  appBase="webapps"  
            unpackWARs="true" autoDeploy="true"  
            xmlValidation="false" xmlNamespaceAware="false">  
            <Context path="" docBase="D:\Tomcat 6.0\webapps\Extra"  
 debug="0" reloadable="true">  
            </Context>  
      </Host>  
    </Engine>  
  </Service>  
</Server> 


你可能感兴趣的:(tomact)