码迷,mamicode.com
首页 > 系统相关 > 详细

tomact配置多个地址 、多个项目

时间:2014-12-22 14:36:20      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:server

<?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.core.JreMemoryLeakPreventionListener" />
  <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="60000" 
               redirectPort="8443"
               maxThreads="100"     
               minSpareThreads="50"     
               maxSpareThreads="60"   
               acceptCount="60"  
               maxPostSize="0" 
               disableUploadTimeout="true" 
               compression="on"    
               compressionMinSize="50" noCompressionUserAgents="gozilla, traviata" 
               compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"/>
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
<!--xxx.xxx.xxx 表示访问地址-->
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">       
       <Context path="" docBase="/项目" debug="0" reloadable="true" />
      </Host>     
     <Host name="xxx.xxx.xxx"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">       
       <Context path="" docBase="/项目" debug="0" reloadable="true"/>
      </Host>
   <Host name="xxx.xxx.xxx"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">       
       <Context path="" docBase="/项目" debug="0" reloadable="true"/>
      </Host>
   </Engine>
  </Service>
</Server>

tomact配置多个地址 、多个项目

标签:server

原文地址:http://blog.csdn.net/itlqi/article/details/42078415

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!