diff --git a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 index 54f8c4f3..56c098fe 100644 --- a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 +++ b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 @@ -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 %}