DCD-224: Fixes to the server.xml template.

This commit is contained in:
Steve Smith
2019-05-07 09:04:17 +10:00
parent b9ac693d14
commit b98a485fa8
3 changed files with 36 additions and 30 deletions

View File

@@ -17,7 +17,7 @@ atl_tomcat_port: "8080"
atl_tomcat_mgmt_port: "8005" atl_tomcat_mgmt_port: "8005"
atl_tomcat_acceptcount: "10" atl_tomcat_acceptcount: "10"
atl_tomcat_connectiontimeout: "20000" atl_tomcat_connectiontimeout: "20000"
atl_tomcat_contextpath: "false" atl_tomcat_contextpath: ""
atl_tomcat_maxthreads: "200" atl_tomcat_maxthreads: "200"
atl_tomcat_minsparethreads: "10" atl_tomcat_minsparethreads: "10"
atl_tomcat_protocol: "HTTP/1.1" atl_tomcat_protocol: "HTTP/1.1"

View File

@@ -31,4 +31,15 @@ def test_server_file(host):
assert f.exists assert f.exists
assert f.contains('Connector port="8080"') assert f.contains('Connector port="8080"')
assert f.contains('Server port="8005"') assert f.contains('Server port="8005"')
assert f.contains('<Context path=""')
assert f.contains('maxThreads="200"')
assert f.contains('minSpareThreads="10"')
assert f.contains('connectionTimeout="20000"')
assert f.contains('enableLookups="false"')
assert f.contains('protocol="HTTP/1.1"')
assert f.contains('redirectPort=""')
assert f.contains('acceptCount="10"')
assert f.contains('secure="false"')
assert f.contains('scheme="http"')
assert not f.contains('proxyName=') assert not f.contains('proxyName=')
assert not f.contains('proxyPort=')

View File

@@ -12,61 +12,56 @@
<Service name="Catalina"> <Service name="Catalina">
<Connector port="{{ atl_tomcat_port }}" <Connector port="{{ atl_tomcat_port }}"
{% if atl_proxy_name is defined and atl_proxy_name != '' %} maxThreads="{{ atl_tomcat_maxthreads }}"
proxyName="{{ atl_proxy_name }}" minSpareThreads="{{ atl_tomcat_minsparethreads }}"
{% endif %} connectionTimeout="{{ atl_tomcat_connectiontimeout }}"
{% if atl_proxy_port is defined and atl_proxy_port != '' %} enableLookups="{{ atl_tomcat_enablelookups }}"
proxyPort="{{ atl_proxy_port }}" protocol="{{ atl_tomcat_protocol }}"
{% endif %} redirectPort="{{ atl_tomcat_redirectport }}"
maxThreads="{{ atl_tomcat_maxthreads }}" acceptCount="{{ atl_tomcat_acceptcount }}"
minSpareThreads="{{ atl_tomcat_minsparethreads }}" secure="{{ atl_tomcat_secure }}"
connectionTimeout="{{ atl_tomcat_connectiontimeout }}" scheme="{{ atl_tomcat_scheme }}"
enableLookups="{{ atl_tomcat_enablelookups }}" {% if atl_proxy_name is defined and atl_proxy_name != '' %}
protocol="{{ atl_tomcat_protocol }}" proxyName="{{ atl_proxy_name }}"
redirectPort="{{ atl_tomcat_redirectport }}" {% endif %}
acceptCount="{{ atl_tomcat_acceptcount }}" {% if atl_proxy_port is defined and atl_proxy_port != '' %}
proxyPort="{{ atl_proxy_port }}"
{% endif %}
disableUploadTimeout="true" relaxedPathChars="[]|"
relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`&quot;&lt;&gt;"
relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" bindOnInit="false"
useBodyEncodingForURI="true" maxHttpHeaderSize="8192"
maxHttpHeaderSize="8192" useBodyEncodingForURI="true"
bindOnInit="false" /> disableUploadTimeout="true" />
<Engine name="Catalina" <Engine name="Catalina"
defaultHost="localhost"> defaultHost="localhost">
<Host name="localhost" <Host name="localhost"
appBase="webapps" appBase="webapps"
unpackWARs="true" unpackWARs="true"
autoDeploy="true"> autoDeploy="true">
<Context path="" <Context path="{{ atl_tomcat_contextpath }}"
docBase="${catalina.home}/atlassian-jira" docBase="${catalina.home}/atlassian-jira"
reloadable="false" reloadable="false"
useHttpOnly="true"> useHttpOnly="true">
<Resource name="UserTransaction" <Resource name="UserTransaction"
auth="Container" auth="Container"
type="javax.transaction.UserTransaction" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" factory="org.objectweb.jotm.UserTransactionFactory"
jotm.timeout="60"/> jotm.timeout="60"/>
<Manager pathname=""/> <Manager pathname=""/>
<JarScanner scanManifest="false"/> <JarScanner scanManifest="false"/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="120" /> threshold="120" />
</Context> </Context>
</Host> </Host>
<Valve className="org.apache.catalina.valves.AccessLogValve" <Valve className="org.apache.catalina.valves.AccessLogValve"
pattern="%a %{jira.request.id}r %{jira.request.username}r %t &quot;%m %U%q %H&quot; %s %b %D &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; &quot;%{jira.request.assession.id}r&quot;"/> pattern="%a %{jira.request.id}r %{jira.request.username}r %t &quot;%m %U%q %H&quot; %s %b %D &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; &quot;%{jira.request.assession.id}r&quot;"/>
</Engine> </Engine>
</Service> </Service>
</Server> </Server>