server.xml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. <Server port="8005" shutdown="SHUTDOWN">
  17. <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  18. <!--APR library loader. Documentation at /docs/apr.html -->
  19. <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  20. <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  21. <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  22. <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  23. <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
  24. <!-- Global JNDI resources
  25. Documentation at /docs/jndi-resources-howto.html
  26. -->
  27. <GlobalNamingResources>
  28. <!-- Editable user database that can also be used by
  29. UserDatabaseRealm to authenticate users
  30. -->
  31. <Resource name="UserDatabase" auth="Container"
  32. type="org.apache.catalina.UserDatabase"
  33. description="User database that can be updated and saved"
  34. factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
  35. pathname="conf/tomcat-users.xml" />
  36. </GlobalNamingResources>
  37. <Service name="Catalina">
  38. <!--The connectors can use a shared executor, you can define one or more named thread pools
  39. <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  40. maxThreads="250" minSpareThreads="4"/>-->
  41. <!-- A "Connector" using the shared thread pool
  42. <Connector executor="tomcatThreadPool"
  43. port="8080" protocol="HTTP/1.1"
  44. connectionTimeout="20000"
  45. redirectPort="8443"
  46. server="Tomcat"/>
  47. -->
  48. <!-- Connector with NIO2 without too much tweaks -->
  49. <Connector port="8080" protocol="org.apache.coyote.http11.Http11Nio2Protocol"
  50. acceptCount="1024"
  51. acceptorThreadCount="2"
  52. maxConnections="-1"
  53. maxKeepAliveRequests="-1"
  54. processorCache="-1"
  55. connectionTimeout="30000"
  56. keepAliveTimeout="30000"
  57. URIEncoding="UTF-8"
  58. redirectPort="8443"
  59. server="Tomcat"/>
  60. <Engine name="Catalina" defaultHost="localhost">
  61. <Realm className="org.apache.catalina.realm.LockOutRealm">
  62. <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
  63. resourceName="UserDatabase"/>
  64. </Realm>
  65. <Host name="localhost" appBase="webapps"
  66. unpackWARs="true" autoDeploy="true">
  67. </Host>
  68. </Engine>
  69. </Service>
  70. </Server>