|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | + |
| 3 | +<!-- |
| 4 | + Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 | + contributor license agreements. See the NOTICE file distributed with |
| 6 | + this work for additional information regarding copyright ownership. |
| 7 | + The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 | + (the "License"); you may not use this file except in compliance with |
| 9 | + the License. You may obtain a copy of the License at |
| 10 | +
|
| 11 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +
|
| 13 | + Unless required by applicable law or agreed to in writing, software |
| 14 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | + See the License for the specific language governing permissions and |
| 17 | + limitations under the License. |
| 18 | +--> |
| 19 | +<Server port="<%= $jira::tomcat_shutdown_port %>" shutdown="SHUTDOWN"> |
| 20 | + <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> |
| 21 | + <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/> |
| 22 | + <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/> |
| 23 | + <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/> |
| 24 | + |
| 25 | +<%- if versioncmp($jira::version, '6.4.14') <= 0 and $jira::product =~ /^jira/ { -%> |
| 26 | + <Listener className="org.apache.catalina.core.JasperListener"/> |
| 27 | +<% } else { -%> |
| 28 | + <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> |
| 29 | +<%- } -%> |
| 30 | + |
| 31 | + <Service name="Catalina"> |
| 32 | + <Connector port="<%= $jira::tomcat_port %>" |
| 33 | + <%- if $jira::tomcat_address { -%> |
| 34 | + address="<%= $jira::tomcat_address %>" |
| 35 | + <%- } -%> |
| 36 | + <%- if (versioncmp($jira::version, '7.12.1') > 0 and $jira::product =~ /^jira/ ) or $jira::product =~ /^servicedesk/ { -%> |
| 37 | + relaxedPathChars="[]|" |
| 38 | + relaxedQueryChars="[]|{}^\`"<>" |
| 39 | + <%- } -%> |
| 40 | + maxThreads="<%= $jira::tomcat_max_threads %>" |
| 41 | + minSpareThreads="<%= $jira::tomcat_min_spare_threads %>" |
| 42 | + connectionTimeout="<%= $jira::tomcat_connection_timeout %>" |
| 43 | + enableLookups="<%= $jira::tomcat_enable_lookups %>" |
| 44 | + maxHttpHeaderSize="<%= $jira::tomcat_max_http_header_size %>" |
| 45 | + protocol="<%= $jira::tomcat_protocol %>" |
| 46 | + useBodyEncodingForURI="<%= $jira::tomcat_use_body_encoding_for_uri %>" |
| 47 | + acceptCount="<%= $jira::tomcat_accept_count %>" |
| 48 | +<% if ! $jira::proxy['scheme'] { -%> |
| 49 | + scheme="http" |
| 50 | +<% } -%> |
| 51 | + disableUploadTimeout="<%= $jira::tomcat_disable_upload_timeout %>" |
| 52 | + bindOnInit="false" |
| 53 | +<% if $jira::tomcat_native_ssl and $jira::tomcat_redirect_https_port { -%> |
| 54 | + redirectPort="<%= $jira::tomcat_redirect_https_port %>" |
| 55 | +<% } else { -%> |
| 56 | + redirectPort="<%= $jira::tomcat_https_port%>" |
| 57 | +<% } -%> |
| 58 | +<% if $jira::proxy { -%> |
| 59 | +<% $jira::proxy.each |$key, $value| { -%> |
| 60 | + <%= $key %> = '<%= $value %>' |
| 61 | +<% } -%> |
| 62 | +<% } -%> |
| 63 | + /> |
| 64 | + |
| 65 | +<% if $jira::tomcat_native_ssl { -%> |
| 66 | + <Connector |
| 67 | + port="<%= $jira::tomcat_https_port %>" |
| 68 | + protocol="<%= $jira::tomcat_protocol_ssl_real %>" |
| 69 | + <%- if $jira::tomcat_address { -%> |
| 70 | + address="<%= $jira::tomcat_address %>" |
| 71 | + <%- } -%> |
| 72 | + <%- if ( versioncmp($jira::version, '7.12.1') > 0 and $jira::product =~ /^jira/ ) or $jira::product =~ /^servicedesk/ { -%> |
| 73 | + relaxedPathChars="[]|" |
| 74 | + relaxedQueryChars="[]|{}^\`"<>" |
| 75 | + <%- } -%> |
| 76 | + maxHttpHeaderSize="<%= $jira::tomcat_max_http_header_size %>" |
| 77 | + SSLEnabled="true" |
| 78 | + maxThreads="<%= $jira::tomcat_max_threads %>" |
| 79 | + minSpareThreads="<%= $jira::tomcat_min_spare_threads %>" |
| 80 | + enableLookups="<%= $jira::tomcat_enable_lookups %>" |
| 81 | + disableUploadTimeout="<%= $jira::tomcat_disable_upload_timeout %>" |
| 82 | + acceptCount="<%= $jira::tomcat_accept_count %>" |
| 83 | +<% if $jira::proxy['scheme'] { -%> |
| 84 | + scheme="https" |
| 85 | +<% } -%> |
| 86 | + secure="true" |
| 87 | + clientAuth="false" |
| 88 | + sslProtocol="TLS" |
| 89 | + useBodyEncodingForURI="true" |
| 90 | + keyAlias="<%= $jira::tomcat_key_alias %>" |
| 91 | + keystoreFile="<%= $jira::tomcat_keystore_file %>" |
| 92 | + keystorePass="<%= $jira::tomcat_keystore_pass %>" |
| 93 | + keystoreType="<%= $jira::tomcat_keystore_type %>" |
| 94 | +<% if $jira::proxy { -%> |
| 95 | +<% $jira::proxy.each |$key, $value| { -%> |
| 96 | + <%= key %> = '<%= $value %>' |
| 97 | +<% } -%> |
| 98 | +<% } -%> |
| 99 | + /> |
| 100 | +<% } -%> |
| 101 | + |
| 102 | +<% if !empty($jira::ajp) { -%> |
| 103 | + <Connector enableLookups="false" URIEncoding="UTF-8" |
| 104 | +<% $jira::ajp.each |$key, $value| { -%> |
| 105 | + <%= key %> = '<%= $value %>' |
| 106 | +<% } -%> |
| 107 | + /> |
| 108 | +<% } -%> |
| 109 | + |
| 110 | +<% $jira::tomcat_additional_connectors.each |$port, $attrs| { -%> |
| 111 | + <Connector port="<%= $port -%>" |
| 112 | +<% $attrs.each |$key, $value| { -%> |
| 113 | + <%= $key -%>="<%= $value -%>" |
| 114 | +<% } -%> |
| 115 | + /> |
| 116 | +<% } -%> |
| 117 | + <Engine name="Catalina" defaultHost="localhost"> |
| 118 | + <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> |
| 119 | + |
| 120 | + <Context path="<%= $jira::contextpath %>" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true"> |
| 121 | + |
| 122 | + <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" |
| 123 | + factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> |
| 124 | + <Manager pathname=""/> |
| 125 | + <JarScanner scanManifest="false"/> |
| 126 | + <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" /> |
| 127 | + </Context> |
| 128 | + |
| 129 | + </Host> |
| 130 | + |
| 131 | + <Valve className="org.apache.catalina.valves.AccessLogValve" resolveHosts="false" |
| 132 | +<% if $jira::tomcat_accesslog_enable_xforwarded_for { %> |
| 133 | + requestAttributesEnabled="true" |
| 134 | +<% } -%> |
| 135 | + pattern="<%= $jira::tomcat_accesslog_format %>"/> |
| 136 | + |
| 137 | +<% if $jira::tomcat_accesslog_enable_xforwarded_for { %> |
| 138 | + <Valve |
| 139 | + className="org.apache.catalina.valves.RemoteIpValve" |
| 140 | + remoteIpHeader="x-forwarded-for" |
| 141 | + remoteIpProxiesHeader="x-forwarded-by"/> |
| 142 | +<% } -%> |
| 143 | + </Engine> |
| 144 | + </Service> |
| 145 | +</Server> |
0 commit comments