forked from ISTI-ansible-roles/ansible-roles
tomcat: Add new variables to server.xml. See https://support.d4science.org/issues/10153.
This commit is contained in:
parent
af2f3f397c
commit
861806eafd
|
@ -9,6 +9,7 @@ tomcat_pkgs:
|
|||
- libapr1
|
||||
tomcat_user: tomcat7
|
||||
tomcat_max_threads: 200
|
||||
|
||||
tomcat_min_heap_size: 2048m
|
||||
tomcat_permgen_defined: True
|
||||
tomcat_heap_size: '{{ tomcat_min_heap_size }}'
|
||||
|
@ -29,6 +30,10 @@ tomcat_ajp_enabled: False
|
|||
tomcat_ajp_port: 8009
|
||||
tomcat_ajp_address: 127.0.0.1
|
||||
tomcat_direct_access: False
|
||||
tomcat_reverse_proxy_name_enabled: False
|
||||
tomcat_reverse_proxy_name: '{{ ansible_fqdn }}'
|
||||
tomcat_reverse_proxy_port: '{{ http_port | default(80) }}'
|
||||
proxyName and proxyPort
|
||||
# There is a bug that kills tomcat after 50 days if the shutdown port is enabled
|
||||
# Disable the shutdown port by default
|
||||
#tomcat_shutdown_port: 8005
|
||||
|
|
|
@ -62,8 +62,11 @@
|
|||
|
||||
{% if tomcat_http_enabled %}
|
||||
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
||||
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
|
||||
maxThreads="{{ tomcat_max_threads }}" minSpareThreads="10"/>
|
||||
<Executor name="tomcatThreadPool"
|
||||
namePrefix="catalina-exec-"
|
||||
maxQueueSize="{{ tomcat_max_queue_size | default(32767) }}"
|
||||
maxThreads="{{ tomcat_max_threads }}"
|
||||
minSpareThreads="10"/>
|
||||
{% endif %}
|
||||
|
||||
<!-- A "Connector" represents an endpoint by which requests are received
|
||||
|
@ -76,11 +79,16 @@
|
|||
{% if tomcat_http_enabled %}
|
||||
<!-- A http "Connector" using the shared thread pool-->
|
||||
<Connector executor="tomcatThreadPool"
|
||||
enableLookups="false" maxPostSize="{{ tomcat_max_post_size }}"
|
||||
enableLookups="false"
|
||||
maxQueueSize="{{ tomcat_max_queue_size | default(32767) }}"
|
||||
maxThreads="{{ tomcat_max_threads }}" connectionTimeout="60000"
|
||||
URIEncoding="UTF-8" bindOnInit="false" address="{{ tomcat_http_address }}"
|
||||
port="{{ tomcat_http_port }}" protocol="HTTP/1.1"
|
||||
maxPostSize="{{ tomcat_max_post_size | default(104857600) }}"
|
||||
{% if tomcat_reverse_proxy_name_enabled %}
|
||||
proxyName="{{ tomcat_reverse_proxy_name }}"
|
||||
proxyPort="{{ tomcat_reverse_proxy_port }}"
|
||||
{% endif %}
|
||||
redirectPort="8443" />
|
||||
|
||||
<!-- Define a SSL HTTP/1.1 Connector on port 8443
|
||||
|
@ -96,9 +104,15 @@
|
|||
{% if tomcat_ajp_enabled %}
|
||||
<!-- Define an AJP 1.3 Connector on port {{ tomcat_ajp_port }} -->
|
||||
<Connector port="{{ tomcat_ajp_port }}" protocol="AJP/1.3" redirectPort="8443"
|
||||
enableLookups="false" address="{{ tomcat_ajp_address }}" maxPostSize="{{ tomcat_max_post_size }}"
|
||||
maxThreads="{{ tomcat_max_threads }}" connectionTimeout="60000"
|
||||
enableLookups="false" address="{{ tomcat_ajp_address }}"
|
||||
maxQueueSize="{{ tomcat_max_queue_size | default(32767) }}"
|
||||
maxThreads="{{ tomcat_max_threads }}"
|
||||
connectionTimeout="60000"
|
||||
maxPostSize="{{ tomcat_max_post_size | default(104857600) }}"
|
||||
{% if tomcat_reverse_proxy_name_enabled %}
|
||||
proxyName="{{ tomcat_reverse_proxy_name }}"
|
||||
proxyPort="{{ tomcat_reverse_proxy_port }}"
|
||||
{% endif %}
|
||||
URIEncoding="UTF-8" bindOnInit="false" />
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue