码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat-server

时间:2018-04-11 14:59:43      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:can   users   ack   pps   rip   event   1.3   shutdown   配置   

<?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.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
  <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.LockOutRealm">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

        <Context docBase="xxx" path=""  reloadable="true" />
      </Host>
    </Engine>
  </Service>
</Server>

如果存在多个host节点,则tomcat会根据配置host节点数启动多次。

context配置节点的docBase属性值即为webapps目录下的子项目(与ROOT目录同一路径下),也会单独启动。

tomcat-server

标签:can   users   ack   pps   rip   event   1.3   shutdown   配置   

原文地址:https://www.cnblogs.com/codechange/p/8794571.html

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