nginx template: proxy the tomcat manager when requested. See https://support.d4science.org/issues/10597

This commit is contained in:
Andrea Dell'Amico 2017-12-06 18:17:31 +01:00
parent c307c38f74
commit c05dd230c2
2 changed files with 25 additions and 0 deletions

View File

@ -6,4 +6,8 @@ smartgears_install_generic_virthost: True
#smartgears_nginx_serveraliases:
smartgears_nginx_cors_enabled: False
nginx_cors_acl_origin: ''
smartgears_tomcat_manager_exposed: False
smartgears_tomcat_manager_access_acls:
- { policy: 'allow', address: '0.0.0.0/0' }
smartgears_nginx_expose_tomcat_logs: False

View File

@ -107,6 +107,17 @@ server {
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/data-transfer-service;
}
{% endif %}
{% if tomcat_m_manager_install or tomcat_m_host_manager_install %}
{% if smartgears_tomcat_manager_exposed %}
location /manager {
{% for acl in smartgears_tomcat_manager_access_acls %}
{{ acl.policy }} {{ acl.address }};
{% endfor %}
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/manager;
}
{% endif %}
{% endif %}
{% if remote_opencpu_server is defined and remote_opencpu_server %}
location {{ opencpu_context | default('/ocpu') }} {
{% if smartgears_nginx_cors_enabled %}
@ -249,6 +260,16 @@ server {
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/data-transfer-service;
}
{% endif %}
{% if tomcat_m_manager_install or tomcat_m_host_manager_install %}
{% if smartgears_tomcat_manager_exposed %}
location /manager {
{% for acl in smartgears_tomcat_manager_access_acls %}
{{ acl.policy }} {{ acl.address }};
{% endfor %}
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/manager;
}
{% endif %}
{% endif %}
{% if remote_opencpu_server is defined and remote_opencpu_server %}
location {{ opencpu_context | default('/ocpu') }} {
{% if smartgears_nginx_cors_enabled %}