Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

etc_tomcat8_server.xml 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. -->
  16. <!-- Note: A "Server" is not itself a "Container", so you may not
  17. define subcomponents such as "Valves" at this level.
  18. Documentation at /docs/config/server.html
  19. -->
  20. <Server port="8005" shutdown="SHUTDOWN">
  21. <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  22. <!-- Security listener. Documentation at /docs/config/listeners.html
  23. <Listener className="org.apache.catalina.security.SecurityListener" />
  24. -->
  25. <!--APR library loader. Documentation at /docs/apr.html -->
  26. <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  27. <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  28. <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  29. <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  30. <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
  31. <!-- Global JNDI resources
  32. Documentation at /docs/jndi-resources-howto.html
  33. -->
  34. <GlobalNamingResources>
  35. <!-- Editable user database that can also be used by
  36. UserDatabaseRealm to authenticate users
  37. -->
  38. <Resource name="UserDatabase" auth="Container"
  39. type="org.apache.catalina.UserDatabase"
  40. description="User database that can be updated and saved"
  41. factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
  42. pathname="conf/tomcat-users.xml" />
  43. </GlobalNamingResources>
  44. <!-- A "Service" is a collection of one or more "Connectors" that share
  45. a single "Container" Note: A "Service" is not itself a "Container",
  46. so you may not define subcomponents such as "Valves" at this level.
  47. Documentation at /docs/config/service.html
  48. -->
  49. <Service name="Catalina">
  50. <!--The connectors can use a shared executor, you can define one or more named thread pools-->
  51. <!--
  52. <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  53. maxThreads="150" minSpareThreads="4"/>
  54. -->
  55. <!-- A "Connector" represents an endpoint by which requests are received
  56. and responses are returned. Documentation at :
  57. Java HTTP Connector: /docs/config/http.html
  58. Java AJP Connector: /docs/config/ajp.html
  59. APR (HTTP/AJP) Connector: /docs/apr.html
  60. Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
  61. -->
  62. <Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1"
  63. connectionTimeout="20000"
  64. redirectPort="8443" />
  65. <!-- A "Connector" using the shared thread pool-->
  66. <!--
  67. <Connector executor="tomcatThreadPool"
  68. port="8080" protocol="HTTP/1.1"
  69. connectionTimeout="20000"
  70. redirectPort="8443" />
  71. -->
  72. <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
  73. This connector uses the NIO implementation. The default
  74. SSLImplementation will depend on the presence of the APR/native
  75. library and the useOpenSSL attribute of the
  76. AprLifecycleListener.
  77. Either JSSE or OpenSSL style configuration may be used regardless of
  78. the SSLImplementation selected. JSSE style configuration is used below.
  79. -->
  80. <!--
  81. <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
  82. maxThreads="150" SSLEnabled="true">
  83. <SSLHostConfig>
  84. <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
  85. type="RSA" />
  86. </SSLHostConfig>
  87. </Connector>
  88. -->
  89. <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
  90. This connector uses the APR/native implementation which always uses
  91. OpenSSL for TLS.
  92. Either JSSE or OpenSSL style configuration may be used. OpenSSL style
  93. configuration is used below.
  94. -->
  95. <!--
  96. <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
  97. maxThreads="150" SSLEnabled="true" >
  98. <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
  99. <SSLHostConfig>
  100. <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
  101. certificateFile="conf/localhost-rsa-cert.pem"
  102. certificateChainFile="conf/localhost-rsa-chain.pem"
  103. type="RSA" />
  104. </SSLHostConfig>
  105. </Connector>
  106. -->
  107. <!-- Define an AJP 1.3 Connector on port 8009 -->
  108. <!--
  109. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  110. -->
  111. <!-- An Engine represents the entry point (within Catalina) that processes
  112. every request. The Engine implementation for Tomcat stand alone
  113. analyzes the HTTP headers included with the request, and passes them
  114. on to the appropriate Host (virtual host).
  115. Documentation at /docs/config/engine.html -->
  116. <!-- You should set jvmRoute to support load-balancing via AJP ie :
  117. <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
  118. -->
  119. <Engine name="Catalina" defaultHost="localhost">
  120. <!--For clustering, please take a look at documentation at:
  121. /docs/cluster-howto.html (simple how to)
  122. /docs/config/cluster.html (reference documentation) -->
  123. <!--
  124. <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  125. -->
  126. <!-- Use the LockOutRealm to prevent attempts to guess user passwords
  127. via a brute-force attack -->
  128. <Realm className="org.apache.catalina.realm.LockOutRealm">
  129. <!-- This Realm uses the UserDatabase configured in the global JNDI
  130. resources under the key "UserDatabase". Any edits
  131. that are performed against this UserDatabase are immediately
  132. available for use by the Realm. -->
  133. <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
  134. resourceName="UserDatabase"/>
  135. </Realm>
  136. <Host name="localhost" appBase="webapps"
  137. unpackWARs="true" autoDeploy="true">
  138. <!-- SingleSignOn valve, share authentication between web applications
  139. Documentation at: /docs/config/valve.html -->
  140. <!--
  141. <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  142. -->
  143. <!-- Access log processes all example.
  144. Documentation at: /docs/config/valve.html
  145. Note: The pattern used is equivalent to using pattern="common" -->
  146. <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
  147. prefix="localhost_access_log" suffix=".txt"
  148. pattern="%h %l %u %t &quot;%r&quot; %s %b" />
  149. </Host>
  150. </Engine>
  151. </Service>
  152. </Server>