server.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. --><!-- Note: A "Server" is not itself a "Container", so you may not
  16. define subcomponents such as "Valves" at this level.
  17. Documentation at /docs/config/server.html
  18. --><Server port="8005" shutdown="SHUTDOWN">
  19. <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
  20. <!-- Security listener. Documentation at /docs/config/listeners.html
  21. <Listener className="org.apache.catalina.security.SecurityListener" />
  22. -->
  23. <!-- APR library loader. Documentation at /docs/apr.html -->
  24. <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
  25. <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  26. <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
  27. <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  28. <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
  29. <!-- Global JNDI resources
  30. Documentation at /docs/jndi-resources-howto.html
  31. -->
  32. <GlobalNamingResources>
  33. <!-- Editable user database that can also be used by
  34. UserDatabaseRealm to authenticate users
  35. -->
  36. <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
  37. </GlobalNamingResources>
  38. <!-- A "Service" is a collection of one or more "Connectors" that share
  39. a single "Container" Note: A "Service" is not itself a "Container",
  40. so you may not define subcomponents such as "Valves" at this level.
  41. Documentation at /docs/config/service.html
  42. -->
  43. <Service name="Catalina">
  44. <!--The connectors can use a shared executor, you can define one or more named thread pools-->
  45. <!--
  46. <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  47. maxThreads="150" minSpareThreads="4"/>
  48. -->
  49. <!-- A "Connector" represents an endpoint by which requests are received
  50. and responses are returned. Documentation at :
  51. HTTP Connector: /docs/config/http.html
  52. AJP Connector: /docs/config/ajp.html
  53. Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
  54. -->
  55. <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
  56. <!-- A "Connector" using the shared thread pool-->
  57. <!--
  58. <Connector executor="tomcatThreadPool"
  59. port="8080" protocol="HTTP/1.1"
  60. connectionTimeout="20000"
  61. redirectPort="8443" />
  62. -->
  63. <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
  64. This connector uses the NIO implementation. The default
  65. SSLImplementation will depend on the presence of the APR/native
  66. library and the useOpenSSL attribute of the AprLifecycleListener.
  67. Either JSSE or OpenSSL style configuration may be used regardless of
  68. the SSLImplementation selected. JSSE style configuration is used below.
  69. -->
  70. <!--
  71. <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
  72. maxThreads="150" SSLEnabled="true">
  73. <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
  74. <SSLHostConfig>
  75. <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
  76. type="RSA" />
  77. </SSLHostConfig>
  78. </Connector>
  79. -->
  80. <!-- Define an AJP 1.3 Connector on port 8009 -->
  81. <!--
  82. <Connector protocol="AJP/1.3"
  83. address="::1"
  84. port="8009"
  85. redirectPort="8443" />
  86. -->
  87. <!-- An Engine represents the entry point (within Catalina) that processes
  88. every request. The Engine implementation for Tomcat stand alone
  89. analyzes the HTTP headers included with the request, and passes them
  90. on to the appropriate Host (virtual host).
  91. Documentation at /docs/config/engine.html -->
  92. <!-- You should set jvmRoute to support load-balancing via AJP ie :
  93. <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
  94. -->
  95. <Engine defaultHost="localhost" name="Catalina">
  96. <!--For clustering, please take a look at documentation at:
  97. /docs/cluster-howto.html (simple how to)
  98. /docs/config/cluster.html (reference documentation) -->
  99. <!--
  100. <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  101. -->
  102. <!-- Use the LockOutRealm to prevent attempts to guess user passwords
  103. via a brute-force attack -->
  104. <Realm className="org.apache.catalina.realm.LockOutRealm">
  105. <!-- This Realm uses the UserDatabase configured in the global JNDI
  106. resources under the key "UserDatabase". Any edits
  107. that are performed against this UserDatabase are immediately
  108. available for use by the Realm. -->
  109. <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
  110. </Realm>
  111. <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
  112. <!-- SingleSignOn valve, share authentication between web applications
  113. Documentation at: /docs/config/valve.html -->
  114. <!--
  115. <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  116. -->
  117. <!-- Access log processes all example.
  118. Documentation at: /docs/config/valve.html
  119. Note: The pattern used is equivalent to using pattern="common" -->
  120. <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log" suffix=".txt"/>
  121. <Context docBase="testWebDay01" path="/testWebDay01" reloadable="true" source="org.eclipse.jst.jee.server:testWebDay01"/><Context docBase="testWebDay02" path="/testWebDay02" reloadable="true" source="org.eclipse.jst.jee.server:testWebDay02"/><Context docBase="MavenEclipseWar" path="/MavenEclipseWar" reloadable="true" source="org.eclipse.jst.jee.server:MavenEclipseWar"/></Host>
  122. </Engine>
  123. </Service>
  124. </Server>