comparison tomcat/server.xml @ 23:6a4ba408b8c4

improve tomcat configuration
author smith@nwoca.org
date Fri, 08 Jan 2016 20:24:11 +0000
parents
children 120fc16ea511
comparison
equal deleted inserted replaced
22:06461e89e3e5 23:6a4ba408b8c4
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
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 -->
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 className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
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
30
31 <GlobalNamingResources>
32 <Resource name="UserDatabase" auth="Container"
33 type="org.apache.catalina.UserDatabase"
34 description="User database for tomcat manager app"
35 factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
36 pathname="conf/tomcat-users.xml" />
37 </GlobalNamingResources>
38
39 <Service name="Catalina">
40
41 <Executor name="tomcatThreads"
42 namePrefix="tomcat-exec-"
43 maxThreads="200"
44 minSpareThreads="1"
45 maxIdleTime="300000"
46 />
47
48 <Connector port="8080" protocol="HTTP/1.1"
49 connectionTimeout="20000"
50 redirectPort="8443"
51 executor="tomcatThreads"/>
52
53 <Engine name="Catalina" defaultHost="localhost">
54
55 <!-- Use the LockOutRealm to prevent attempts to guess user passwords
56 via a brute-force attack -->
57 <Realm className="org.apache.catalina.realm.LockOutRealm">
58 <!-- This Realm uses the UserDatabase configured in the global JNDI
59 resources under the key "UserDatabase". Any edits
60 that are performed against this UserDatabase are immediately
61 available for use by the Realm. -->
62 <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
63 resourceName="UserDatabase"/>
64 </Realm>
65
66 <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
67 <Valve className="org.apache.catalina.valves.AccessLogValve"
68 directory="logs"
69 prefix="localhost_access_log" suffix=".txt"
70 pattern="%h %l %u %t &quot;%r&quot; %s %b" />
71
72 </Host>
73 </Engine>
74 </Service>
75 </Server>