diff --git a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 index d7d1d5d..a659e5f 100644 --- a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 +++ b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 @@ -1,6 +1,10 @@ server { listen {{ http_port }}; +{% if egi_image is defined and egi_image %} + # No servername into the EGI images +{% else %} server_name {{ item.servername }}; +{% endif %} {% if letsencrypt_acme_install %} include /etc/nginx/snippets/letsencrypt-proxy.conf; {% endif %} @@ -80,7 +84,11 @@ server { {% if letsencrypt_acme_install %} server { listen {{ https_port }} ssl; +{% if egi_image is defined and egi_image %} + # No servername into the EGI images +{% else %} server_name {{ item.servername }}; +{% endif %} access_log /var/log/nginx/{{ item.servername }}_access_ssl.log; error_log /var/log/nginx/{{ item.servername }}_error_ssl.log;