library/roles/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2: expose whn-manager over http even if we redirect the main apps over https.

This commit is contained in:
Andrea Dell'Amico 2017-07-04 18:17:13 +02:00
parent 848b7c94d9
commit 934ba8d8ef
1 changed files with 11 additions and 10 deletions

View File

@ -9,7 +9,6 @@ server {
{% if letsencrypt_acme_install %}
include /etc/nginx/snippets/letsencrypt-proxy.conf;
{% endif %}
{% if not http_redirect_to_https %}
access_log /var/log/nginx/{{ item.servername }}_access.log;
error_log /var/log/nginx/{{ item.servername }}_error.log;
root /usr/share/nginx/html/;
@ -55,21 +54,24 @@ server {
rewrite ^/auth-sign-in http://{{ item.servername }}/r-connector/gcube/service/disconnect;
}
{% endif %}
location /whn-manager {
proxy_pass http://localhost:{{ item.http_port }}/whn-manager;
}
{% if not http_redirect_to_https %}
{% for instance in tomcat_m_instances %}
{% for context in instance.app_contexts %}
{% if context != "whn-manager" %}
location /{{ context }} {
{% if smartgears_nginx_cors_enabled %}
include /etc/nginx/snippets/nginx-cors.conf;
{% endif %}
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
}
{% endif %}
{% endfor %}
{% endfor %}
{% if smart_executor_install is defined and smart_executor_install %}
location {{ smart_executor_context }} {
{% if smartgears_nginx_cors_enabled %}
include /etc/nginx/snippets/nginx-cors.conf;
{% endif %}
proxy_pass http://localhost:{{ smartgears_http_port }}{{ smart_executor_context }};
}
{% endif %}
@ -158,29 +160,28 @@ server {
rewrite ^/auth-sign-in http://{{ item.servername }}/r-connector/gcube/service/disconnect;
}
{% endif %}
location /whn-manager {
proxy_pass http://localhost:{{ item.http_port }}/whn-manager;
}
{% for instance in tomcat_m_instances %}
{% for context in instance.app_contexts %}
{% if context != "whn-manager" %}
location /{{ context }} {
{% if smartgears_nginx_cors_enabled %}
include /etc/nginx/snippets/nginx-cors.conf;
{% endif %}
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
}
{% endif %}
{% endfor %}
{% endfor %}
{% if smart_executor_install is defined and smart_executor_install %}
location {{ smart_executor_context }} {
{% if smartgears_nginx_cors_enabled %}
include /etc/nginx/snippets/nginx-cors.conf;
{% endif %}
proxy_pass http://localhost:{{ smartgears_http_port }}{{ smart_executor_context }};
}
{% endif %}
{% if data_transfer_service_install %}
location /data-transfer-service {
{% if smartgears_nginx_cors_enabled %}
include /etc/nginx/snippets/nginx-cors.conf;
{% endif %}
proxy_pass http://localhost:{{ smartgears_http_port }}/data-transfer-service;
}
{% endif %}