source: main/trunk/greenstone3/resources/tomcat/server_tomcat8.xml.svn@ 33991

Last change on this file since 33991 was 33991, checked in by davidb, 4 years ago

A version of the tomcat/conf/server.xml file that is better aligned with more recent tomcat v8.5.xx versions. This alignment is about how the elements are laid out, and does not acutally change any of the values in use.

File size: 9.4 KB
Line 
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<!-- GSDL: Notes
19 To turn a new default 'conf/server.xml' into a server_tomcatN.xml.svn
20 Perform the following substitutions:
21 8443 => @https.redirect.port@
22 8009 => @tomcat.ajp.port@
23-->
24
25<!-- Note: A "Server" is not itself a "Container", so you may not
26 define subcomponents such as "Valves" at this level.
27 Documentation at /docs/config/server.html
28 -->
29<Server port="@shutdown-port@" shutdown="SHUTDOWN">
30 <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
31 <!-- Security listener. Documentation at /docs/config/listeners.html
32 <Listener className="org.apache.catalina.security.SecurityListener" />
33 -->
34 <!--APR library loader. Documentation at /docs/apr.html -->
35 <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
36 <!-- Prevent memory leaks due to use of particular java/javax APIs-->
37 <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
38 <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
39 <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
40
41 <!-- Global JNDI resources
42 Documentation at /docs/jndi-resources-howto.html
43 -->
44 <GlobalNamingResources>
45 <!-- Editable user database that can also be used by
46 UserDatabaseRealm to authenticate users
47 -->
48 <Resource name="UserDatabase" auth="Container"
49 type="org.apache.catalina.UserDatabase"
50 description="User database that can be updated and saved"
51 factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
52 pathname="conf/tomcat-users.xml" />
53 </GlobalNamingResources>
54
55 <!-- A "Service" is a collection of one or more "Connectors" that share
56 a single "Container" Note: A "Service" is not itself a "Container",
57 so you may not define subcomponents such as "Valves" at this level.
58 Documentation at /docs/config/service.html
59 -->
60 <Service name="Catalina">
61
62 <!--The connectors can use a shared executor, you can define one or more named thread pools-->
63 <!--
64 <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
65 maxThreads="150" minSpareThreads="4"/>
66 -->
67
68
69 <!-- A "Connector" represents an endpoint by which requests are received
70 and responses are returned. Documentation at :
71 Java HTTP Connector: /docs/config/http.html
72 Java AJP Connector: /docs/config/ajp.html
73 APR (HTTP/AJP) Connector: /docs/apr.html
74 Define a non-SSL/TLS HTTP/1.1 Connector on port @localhost.port.http@
75 -->
76 <!-- GSDL: We comment out the 'standard' connector in favour of the tomcatThreadPool one blow -->
77 <!-- GSDL: URIEncoding of UTF-8 param also added -->
78 <!--
79 <Connector @http.address.restriction@
80 port="@localhost.port.http@" protocol="HTTP/1.1"
81 connectionTimeout="20000"
82 redirectPort="@https.redirect.port@"
83 URIEncoding="UTF-8" />
84 -->
85 <!-- A "Connector" using the shared thread pool-->
86 <!-- GSDL: Additional params added after redirectPort -->
87 <Connector executor="tomcatThreadPool" @http.address.restriction@
88 port="@localhost.port.http@" protocol="HTTP/1.1"
89 connectionTimeout="20000"
90 redirectPort="@https.redirect.port@"
91 compression="on"
92 compressionMinSize="524288"
93 compressableMimeType="text/html,text/xml,text/css,text/xsl,text/javascript"
94 noCompressionUserAgents="gozilla, traviata"
95 URIEncoding="UTF-8" />
96 <!-- Define an SSL/TLS HTTP/1.1 Connector on port @https.redirect.port@
97 This connector uses the NIO implementation. The default
98 SSLImplementation will depend on the presence of the APR/native
99 library and the useOpenSSL attribute of the
100 AprLifecycleListener.
101 Either JSSE or OpenSSL style configuration may be used regardless of
102 the SSLImplementation selected. JSSE style configuration is used below.
103 -->
104 <!-- GSDL: URIEncoding param added, but note the connector elem itself is commented out by default -->
105 <!--
106 <Connector port="@https.redirect.port@" protocol="org.apache.coyote.http11.Http11NioProtocol"
107 maxThreads="150" SSLEnabled="true" URIEncoding="UTF-8">
108 <SSLHostConfig>
109 <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
110 type="RSA" />
111 </SSLHostConfig>
112 </Connector>
113 -->
114 <!-- Define an SSL/TLS HTTP/1.1 Connector on port @https.redirect.port@ with HTTP/2
115 This connector uses the APR/native implementation which always uses
116 OpenSSL for TLS.
117 Either JSSE or OpenSSL style configuration may be used. OpenSSL style
118 configuration is used below.
119 -->
120 <!-- GSDL: URIEncoding param added, but note the connector elem itself is commented out by default -->
121 <!--
122 <Connector port="@https.redirect.port@" protocol="org.apache.coyote.http11.Http11AprProtocol"
123 maxThreads="150" SSLEnabled="true" URIEncoding="UTF-8">
124 <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
125 <SSLHostConfig>
126 <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
127 certificateFile="conf/localhost-rsa-cert.pem"
128 certificateChainFile="conf/localhost-rsa-chain.pem"
129 type="RSA" />
130 </SSLHostConfig>
131 </Connector>
132 -->
133 <!-- GSDL: Connector element aligned with Greenstone documentation for for https access, if activated -->
134 @https.comment.out.start@
135 <Connector port="@tomcat.port.https@" protocol="org.apache.coyote.http11.Http11Protocol"
136 maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
137 keystoreFile="@keystore.file@"
138 keystorePass="@keystore.pass@"
139 clientAuth="false" sslProtocol="TLS"
140 keystoreType="@keystore.type@"
141 URIEncoding="UTF-8" />
142 @https.comment.out.end@
143
144 <!-- Define an AJP 1.3 Connector on port @tomcat.ajp.port@ -->
145 <!--
146 <Connector protocol="AJP/1.3"
147 address="::1"
148 port="@tomcat.ajp.port@"
149 redirectPort="@https.redirect.port@"
150 URIEncoding="UTF-8" />
151 -->
152
153 <!-- An Engine represents the entry point (within Catalina) that processes
154 every request. The Engine implementation for Tomcat stand alone
155 analyzes the HTTP headers included with the request, and passes them
156 on to the appropriate Host (virtual host).
157 Documentation at /docs/config/engine.html -->
158
159 <!-- You should set jvmRoute to support load-balancing via AJP ie :
160 <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
161 -->
162 <Engine name="Catalina" defaultHost="localhost">
163
164 <!--For clustering, please take a look at documentation at:
165 /docs/cluster-howto.html (simple how to)
166 /docs/config/cluster.html (reference documentation) -->
167 <!--
168 <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
169 -->
170
171 <!-- Use the LockOutRealm to prevent attempts to guess user passwords
172 via a brute-force attack -->
173 <Realm className="org.apache.catalina.realm.LockOutRealm">
174 <!-- This Realm uses the UserDatabase configured in the global JNDI
175 resources under the key "UserDatabase". Any edits
176 that are performed against this UserDatabase are immediately
177 available for use by the Realm. -->
178 <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
179 resourceName="UserDatabase"/>
180 </Realm>
181
182 <Host name="localhost" appBase="webapps"
183 unpackWARs="true" autoDeploy="true">
184
185 <!-- SingleSignOn valve, share authentication between web applications
186 Documentation at: /docs/config/valve.html -->
187 <!--
188 <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
189 -->
190
191 <!-- Access log processes all example.
192 Documentation at: /docs/config/valve.html
193 Note: The pattern used is equivalent to using pattern="common" -->
194 <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
195 prefix="localhost_access_log" suffix=".txt"
196 pattern="%h %l %u %t &quot;%r&quot; %s %b" />
197
198 </Host>
199 </Engine>
200 </Service>
201</Server>
Note: See TracBrowser for help on using the repository browser.