annotate tomcat-17/server.xml @ 530:7067a9e7e993 release/2.17.0

flow: Created branch 'release/2.17.0'.
author Marc Davis <marc.davis@mcoecn.org>
date Thu, 02 May 2024 22:45:37 -0400
parents 2201156ad763
children
rev   line source
23
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
1 <?xml version='1.0' encoding='utf-8'?>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
2 <!--
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
3 Licensed to the Apache Software Foundation (ASF) under one or more
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
4 contributor license agreements. See the NOTICE file distributed with
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
5 this work for additional information regarding copyright ownership.
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
6 The ASF licenses this file to You under the Apache License, Version 2.0
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
7 (the "License"); you may not use this file except in compliance with
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
8 the License. You may obtain a copy of the License at
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
9
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
10 http://www.apache.org/licenses/LICENSE-2.0
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
11
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
12 Unless required by applicable law or agreed to in writing, software
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
13 distributed under the License is distributed on an "AS IS" BASIS,
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
15 See the License for the specific language governing permissions and
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
16 limitations under the License.
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
17 -->
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
18 <Server port="8005" shutdown="SHUTDOWN">
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
19 <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
20 <!-- Security listener. Documentation at /docs/config/listeners.html
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
21 <Listener className="org.apache.catalina.security.SecurityListener" />
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
22 -->
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
23 <!--APR library loader. Documentation at /docs/apr.html -->
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
24 <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
25 <!-- Prevent memory leaks due to use of particular java/javax APIs-->
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
26 <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
27 <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
28 <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
29
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
30
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
31 <GlobalNamingResources>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
32 <Resource name="UserDatabase" auth="Container"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
33 type="org.apache.catalina.UserDatabase"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
34 description="User database for tomcat manager app"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
35 factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
36 pathname="conf/tomcat-users.xml" />
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
37 </GlobalNamingResources>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
38
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
39 <Service name="Catalina">
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
40
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
41 <Executor name="tomcatThreads"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
42 namePrefix="tomcat-exec-"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
43 maxThreads="200"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
44 minSpareThreads="1"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
45 maxIdleTime="300000"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
46 />
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
47
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
48 <Connector port="8080" protocol="HTTP/1.1"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
49 connectionTimeout="20000"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
50 redirectPort="8443"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
51 executor="tomcatThreads"/>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
52
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
53 <Engine name="Catalina" defaultHost="localhost">
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
54
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
55 <!-- Use the LockOutRealm to prevent attempts to guess user passwords
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
56 via a brute-force attack -->
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
57 <Realm className="org.apache.catalina.realm.LockOutRealm">
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
58 <!-- This Realm uses the UserDatabase configured in the global JNDI
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
59 resources under the key "UserDatabase". Any edits
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
60 that are performed against this UserDatabase are immediately
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
61 available for use by the Realm. -->
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
62 <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
63 resourceName="UserDatabase"/>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
64 </Realm>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
65
92
120fc16ea511 USASR-2388: update tomcat. customize logging. disable autodepoy.
smith@nwoca.org
parents: 23
diff changeset
66 <Host name="localhost" appBase="webapps" unpackWARs="false" autoDeploy="false">
23
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
67 <Valve className="org.apache.catalina.valves.AccessLogValve"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
68 directory="logs"
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
69 prefix="localhost_access_log" suffix=".txt"
255
adbef03ee9e8 add max days to access log
smith@nwoca.org
parents: 92
diff changeset
70 pattern="%h %l %u %t &quot;%r&quot; %s %b"
adbef03ee9e8 add max days to access log
smith@nwoca.org
parents: 92
diff changeset
71 maxDays="5"/>
23
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
72
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
73 </Host>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
74 </Engine>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
75 </Service>
6a4ba408b8c4 improve tomcat configuration
smith@nwoca.org
parents:
diff changeset
76 </Server>