docker-atlassian-confluence.../config/server.xml.j2
Eugene Ivantsov 8dce9d328c Merged in remote-valve-config (pull request #162)
Properly configure remoteIpValve

* Fix typos

* Fix more typos

* Fix unit tests

* Fix docker compose wait

* Rename remoteipvalve tests

* Fix docker compose yaml

* Add missing quotes

* Remove sleep

* Fix formatting

* More formatting


Approved-by: Yifei Zhang
2024-05-02 02:33:19 +00:00

84 lines
3.9 KiB
Django/Jinja

<?xml version="1.0" encoding="utf-8"?>
<Server port="{{ atl_tomcat_mgmt_port | default('8000') }}"
shutdown="SHUTDOWN">
<Service name="Catalina">
<Connector port="{{ atl_tomcat_port | default('8090') }}"
maxThreads="{{ atl_tomcat_maxthreads | default('48') }}"
minSpareThreads="{{ atl_tomcat_minsparethreads | default('10') }}"
connectionTimeout="{{ atl_tomcat_connectiontimeout | default('20000') }}"
enableLookups="{{ atl_tomcat_enablelookups | default('false') }}"
protocol="{{ atl_tomcat_protocol | default('org.apache.coyote.http11.Http11NioProtocol') }}"
redirectPort="{{ atl_tomcat_redirectport | default('8443') }}"
acceptCount="{{ atl_tomcat_acceptcount | default('10') }}"
debug="{{ atl_tomcat_debug | default('0') }}"
URIEncoding="{{ atl_tomcat_uriencoding | default('UTF-8') }}"
secure="{{ atl_tomcat_secure | default(catalina_connector_secure) | default('false') }}"
scheme="{{ atl_tomcat_scheme | default(catalina_connector_scheme) | default('http') }}"
proxyName="{{ atl_proxy_name | default(catalina_connector_proxyname) | default('') }}"
proxyPort="{{ atl_proxy_port | default(catalina_connector_proxyport) | default('') }}"
maxHttpHeaderSize="{{ atl_tomcat_maxhttpheadersize | default('8192') }}" />
<Engine name="Standalone"
defaultHost="localhost"
debug="0">
<Host name="localhost"
debug="0"
appBase="webapps"
unpackWARs="true"
autoDeploy="false"
startStopThreads="4">
<Context path="{{ atl_tomcat_contextpath | default(catalina_context_path) | default('') }}"
docBase="../confluence"
debug="0"
reloadable="false"
useHttpOnly="true">
<!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
<Manager pathname=""/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="60"/>
{% if ((atl_tomcat_access_log == 'true') or
(atl_tomcat_access_log is not defined and (confluence_version.split('.') | map('int') | list) >= ('7.11.0'.split('.') | map('int') | list)) ) %}
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs"
prefix="confluence_access"
suffix=".log"
rotatable="true"
pattern="%h %{X-AUSERNAME}o %t &quot;%r&quot; %s %b %D %U %I &quot;%{User-Agent}i&quot;"
requestAttributesEnabled="{{ atl_tomcat_requestattributesenabled | default('false') }}"
maxDays="{{ atl_tomcat_access_logs_maxdays | default('-1') }}"/>
{%- endif %}
{%- if atl_tomcat_trustedproxies is defined or atl_tomcat_internalproxies is defined %}
<Valve className="org.apache.catalina.valves.RemoteIpValve"
{%- if atl_tomcat_trustedproxies %}
trustedProxies="{{ atl_tomcat_trustedproxies }}"
{%- endif %}
{%- if atl_tomcat_internalproxies %}
internalProxies="{{ atl_tomcat_internalproxies }}"
{%- endif %}
remoteIpHeader="x-forwarded-for"
proxiesHeader="x-forwarded-by"
protocolHeader="x-forwarded-proto"/>
{%- endif %}
</Context>
<Context path="${confluence.context.path}/synchrony-proxy"
docBase="../synchrony-proxy"
debug="0"
reloadable="false"
useHttpOnly="true">
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="60"/>
</Context>
</Host>
</Engine>
</Service>
</Server>