blob: 9bb10fee67344a6a218d53ee403aaa6b454519e2 [file] [log] [blame]
Sylvain Desbureauxe6a1a372021-02-25 18:07:55 +01001<?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<!-- Note: A "Server" is not itself a "Container", so you may not
17 define subcomponents such as "Valves" at this level.
18 Documentation at /docs/config/server.html
19*/}} -->
20
21<Server port="8005" shutdown="SHUTDOWN">
22 <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
23 <!-- Security listener. Documentation at /docs/config/listeners.html
24 <Listener className="org.apache.catalina.security.SecurityListener" />
25 -->
26 <!--APR library loader. Documentation at /docs/apr.html -->
Andreas Geissler22f3b162023-02-07 13:10:01 +010027 <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="{{ (eq "true" (include "common.needTLS" .)) | ternary "on" "off" }}" />
Sylvain Desbureauxe6a1a372021-02-25 18:07:55 +010028 <!-- Prevent memory leaks due to use of particular java/javax APIs-->
29 <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
30 <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
31 <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
32
33 <!-- Global JNDI resources
34 Documentation at /docs/jndi-resources-howto.html
35 -->
36 <GlobalNamingResources>
37 <!-- Editable user database that can also be used by
38 UserDatabaseRealm to authenticate users
39 -->
40 <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" />
41 </GlobalNamingResources>
42
43 <!-- A "Service" is a collection of one or more "Connectors" that share
44 a single "Container" Note: A "Service" is not itself a "Container",
45 so you may not define subcomponents such as "Valves" at this level.
46 Documentation at /docs/config/service.html
47 -->
48 <Service name="Catalina">
49
50 <!--The connectors can use a shared executor, you can define one or more named thread pools-->
51 <!--
52 <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
53 maxThreads="150" minSpareThreads="4"/>
54 -->
55
56
57 <!-- A "Connector" represents an endpoint by which requests are received
58 and responses are returned. Documentation at :
59 Java HTTP Connector: /docs/config/http.html
60 Java AJP Connector: /docs/config/ajp.html
61 APR (HTTP/AJP) Connector: /docs/apr.html
62 Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
63 -->
Andreas Geissler22f3b162023-02-07 13:10:01 +010064 {{ if (include "common.needTLS" .) }}
amatthewsb6229de2022-10-25 12:27:50 +010065 <Connector port="8080" protocol="HTTP/1.1"
Sylvain Desbureauxe6a1a372021-02-25 18:07:55 +010066 connectionTimeout="20000"
67 redirectPort="8443" />
amatthewsb6229de2022-10-25 12:27:50 +010068
Sylvain Desbureauxe6a1a372021-02-25 18:07:55 +010069 <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.fqi_namespace }}.p12" keystorePass="${KEYSTORE_PASSWORD}" />
Andreas Geissler22f3b162023-02-07 13:10:01 +010070 {{ else }}
71 <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" />
72 {{ end }}
Sylvain Desbureauxe6a1a372021-02-25 18:07:55 +010073
74 <!-- A "Connector" using the shared thread pool-->
75 <!--
76 <Connector executor="tomcatThreadPool"
77 port="8080" protocol="HTTP/1.1"
78 connectionTimeout="20000"
79 redirectPort="8443" />
80 -->
81 <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
82 This connector uses the NIO implementation. The default
83 SSLImplementation will depend on the presence of the APR/native
84 library and the useOpenSSL attribute of the
85 AprLifecycleListener.
86 Either JSSE or OpenSSL style configuration may be used regardless of
87 the SSLImplementation selected. JSSE style configuration is used below.
88 -->
89 <!--
90 <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
91 maxThreads="150" SSLEnabled="true">
92 <SSLHostConfig>
93 <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
94 type="RSA" />
95 </SSLHostConfig>
96 </Connector>
97 -->
98 <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
99 This connector uses the APR/native implementation which always uses
100 OpenSSL for TLS.
101 Either JSSE or OpenSSL style configuration may be used. OpenSSL style
102 configuration is used below.
103 -->
104 <!--
105 <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
106 maxThreads="150" SSLEnabled="true" >
107 <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
108 <SSLHostConfig>
109 <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
110 certificateFile="conf/localhost-rsa-cert.pem"
111 certificateChainFile="conf/localhost-rsa-chain.pem"
112 type="RSA" />
113 </SSLHostConfig>
114 </Connector>
115 -->
116
117 <!-- Define an AJP 1.3 Connector on port 8009 -->
Andreas Geissler22f3b162023-02-07 13:10:01 +0100118 {{ if (include "common.needTLS" .) }}
Sylvain Desbureauxe6a1a372021-02-25 18:07:55 +0100119 <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Andreas Geissler22f3b162023-02-07 13:10:01 +0100120 {{ else }}
121 <Connector port="8009" protocol="AJP/1.3" secretRequired="false" />
122 {{ end }}
Sylvain Desbureauxe6a1a372021-02-25 18:07:55 +0100123
124
125 <!-- An Engine represents the entry point (within Catalina) that processes
126 every request. The Engine implementation for Tomcat stand alone
127 analyzes the HTTP headers included with the request, and passes them
128 on to the appropriate Host (virtual host).
129 Documentation at /docs/config/engine.html -->
130
131 <!-- You should set jvmRoute to support load-balancing via AJP ie :
132 <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
133 -->
134 <Engine name="Catalina" defaultHost="localhost">
135
136 <!--For clustering, please take a look at documentation at:
137 /docs/cluster-howto.html (simple how to)
138 /docs/config/cluster.html (reference documentation) -->
139 <!--
140 <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
141 -->
142
143 <!-- Use the LockOutRealm to prevent attempts to guess user passwords
144 via a brute-force attack -->
145 <Realm className="org.apache.catalina.realm.LockOutRealm">
146 <!-- This Realm uses the UserDatabase configured in the global JNDI
147 resources under the key "UserDatabase". Any edits
148 that are performed against this UserDatabase are immediately
149 available for use by the Realm. -->
150 <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" />
151 </Realm>
152
153 <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
154
155 <!-- SingleSignOn valve, share authentication between web applications
156 Documentation at: /docs/config/valve.html -->
157 <!--
158 <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
159 -->
160
161 <!-- Access log processes all example.
162 Documentation at: /docs/config/valve.html
163 Note: The pattern used is equivalent to using pattern="common" -->
164 <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
165
166 </Host>
167 </Engine>
168 </Service>
169</Server>