diff --git a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 index 56c098fe..04be5b9d 100644 --- a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 +++ b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 @@ -61,6 +61,7 @@ server { {% for instance in tomcat_m_instances %} {% for context in instance.app_contexts %} {% if context != "whn-manager" %} + {% if context != '' %} location /{{ context }} { {% if smartgears_nginx_cors_enabled %} include /etc/nginx/snippets/nginx-cors.conf; @@ -68,6 +69,7 @@ server { proxy_pass http://localhost:{{ item.http_port }}/{{ context }}; } {% endif %} + {% endif %} {% endfor %} {% endfor %} {% if smart_executor_install is defined and smart_executor_install %} @@ -166,6 +168,7 @@ server { {% for instance in tomcat_m_instances %} {% for context in instance.app_contexts %} {% if context != "whn-manager" %} + {% if context != '' %} location /{{ context }} { {% if smartgears_nginx_cors_enabled %} include /etc/nginx/snippets/nginx-cors.conf; @@ -173,6 +176,7 @@ server { proxy_pass http://localhost:{{ item.http_port }}/{{ context }}; } {% endif %} + {% endif %} {% endfor %} {% endfor %} {% if smart_executor_install is defined and smart_executor_install %} diff --git a/smartgears/smartgears/defaults/main.yml b/smartgears/smartgears/defaults/main.yml index e5da0501..3a79333b 100644 --- a/smartgears/smartgears/defaults/main.yml +++ b/smartgears/smartgears/defaults/main.yml @@ -49,7 +49,7 @@ smartgears_service_name: 'tomcat-instance-{{ smartgears_http_port }}' smartgears_loglevel: WARN -smartgears_tomcat_contexts: [ 'whn-manager' ] +smartgears_tomcat_contexts: [ '' ] # The iptables rules use this