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

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

Notes at start of file updated

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