diff --git a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 index c5998508..a38dbabb 100644 --- a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 +++ b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 @@ -4,7 +4,7 @@ server { {% if egi_image is defined and egi_image %} # No servername into the EGI images {% elif hostname is defined %} - servername _; + server_name _; {% else %} server_name {{ item.servername }} {% if smartgears_nginx_serveraliases is defined %}{% for vh in smartgears_nginx_serveraliases %} {{ vh }}{% endfor %}{% endif %}; {% endif %} @@ -133,6 +133,8 @@ server { client_max_body_size {{ nginx_client_max_body_size | default('100M') }}; {% if egi_image is defined and egi_image %} # No servername into the EGI images +{% elif hostname is defined %} + server_name _; {% else %} server_name {{ item.servername }} {% if smartgears_nginx_serveraliases is defined %}{% for vh in smartgears_nginx_serveraliases %} {{ vh }}{% endfor %}{% endif %}; {% endif %}