library/roles/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2: Do not set 'servername' on the EGI images. The hostname is usually wrong.

This commit is contained in:
Andrea Dell'Amico 2016-11-18 10:54:40 +01:00
parent d0ca5c3aa6
commit 66cf85267d
1 changed files with 8 additions and 0 deletions

View File

@ -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;