forked from ISTI-ansible-roles/ansible-roles
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:
parent
848b7c94d9
commit
934ba8d8ef
smartgears/smartgears-nginx-frontend/templates
|
@ -9,7 +9,6 @@ server {
|
||||||
{% if letsencrypt_acme_install %}
|
{% if letsencrypt_acme_install %}
|
||||||
include /etc/nginx/snippets/letsencrypt-proxy.conf;
|
include /etc/nginx/snippets/letsencrypt-proxy.conf;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not http_redirect_to_https %}
|
|
||||||
access_log /var/log/nginx/{{ item.servername }}_access.log;
|
access_log /var/log/nginx/{{ item.servername }}_access.log;
|
||||||
error_log /var/log/nginx/{{ item.servername }}_error.log;
|
error_log /var/log/nginx/{{ item.servername }}_error.log;
|
||||||
root /usr/share/nginx/html/;
|
root /usr/share/nginx/html/;
|
||||||
|
@ -55,21 +54,24 @@ server {
|
||||||
rewrite ^/auth-sign-in http://{{ item.servername }}/r-connector/gcube/service/disconnect;
|
rewrite ^/auth-sign-in http://{{ item.servername }}/r-connector/gcube/service/disconnect;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% 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 instance in tomcat_m_instances %}
|
||||||
{% for context in instance.app_contexts %}
|
{% for context in instance.app_contexts %}
|
||||||
|
{% if context != "whn-manager" %}
|
||||||
location /{{ context }} {
|
location /{{ context }} {
|
||||||
{% if smartgears_nginx_cors_enabled %}
|
{% if smartgears_nginx_cors_enabled %}
|
||||||
include /etc/nginx/snippets/nginx-cors.conf;
|
include /etc/nginx/snippets/nginx-cors.conf;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
|
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if smart_executor_install is defined and smart_executor_install %}
|
{% if smart_executor_install is defined and smart_executor_install %}
|
||||||
location {{ smart_executor_context }} {
|
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 }};
|
proxy_pass http://localhost:{{ smartgears_http_port }}{{ smart_executor_context }};
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -158,29 +160,28 @@ server {
|
||||||
rewrite ^/auth-sign-in http://{{ item.servername }}/r-connector/gcube/service/disconnect;
|
rewrite ^/auth-sign-in http://{{ item.servername }}/r-connector/gcube/service/disconnect;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
location /whn-manager {
|
||||||
|
proxy_pass http://localhost:{{ item.http_port }}/whn-manager;
|
||||||
|
}
|
||||||
{% for instance in tomcat_m_instances %}
|
{% for instance in tomcat_m_instances %}
|
||||||
{% for context in instance.app_contexts %}
|
{% for context in instance.app_contexts %}
|
||||||
|
{% if context != "whn-manager" %}
|
||||||
location /{{ context }} {
|
location /{{ context }} {
|
||||||
{% if smartgears_nginx_cors_enabled %}
|
{% if smartgears_nginx_cors_enabled %}
|
||||||
include /etc/nginx/snippets/nginx-cors.conf;
|
include /etc/nginx/snippets/nginx-cors.conf;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
|
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if smart_executor_install is defined and smart_executor_install %}
|
{% if smart_executor_install is defined and smart_executor_install %}
|
||||||
location {{ smart_executor_context }} {
|
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 }};
|
proxy_pass http://localhost:{{ smartgears_http_port }}{{ smart_executor_context }};
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if data_transfer_service_install %}
|
{% if data_transfer_service_install %}
|
||||||
location /data-transfer-service {
|
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;
|
proxy_pass http://localhost:{{ smartgears_http_port }}/data-transfer-service;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue