library/roles/smartgears/smartgears-nginx-frontend: Some smartgears nodes have aliases. Handle them in the virtualhost configuration.

This commit is contained in:
Andrea Dell'Amico 2016-11-23 12:28:05 +01:00
parent 7a8b52c96e
commit df49cb8049
2 changed files with 3 additions and 3 deletions

View File

@ -3,4 +3,4 @@ setup_nginx: False
http_redirect_to_https: False
letsencrypt_acme_install: False
smartgears_install_generic_virthost: True
#smartgears_nginx_serveraliases:

View File

@ -3,7 +3,7 @@ server {
{% if egi_image is defined and egi_image %}
# No servername into the EGI images
{% else %}
server_name {{ item.servername }};
server_name {{ item.servername }} {% if smartgears_nginx_serveraliases is defined %}{% for vh in smartgears_nginx_serveraliases %} {{ vh }}{% endfor %}{% endif %};
{% endif %}
{% if letsencrypt_acme_install %}
include /etc/nginx/snippets/letsencrypt-proxy.conf;
@ -87,7 +87,7 @@ server {
{% if egi_image is defined and egi_image %}
# No servername into the EGI images
{% else %}
server_name {{ item.servername }};
server_name {{ item.servername }} {% if smartgears_nginx_serveraliases is defined %}{% for vh in smartgears_nginx_serveraliases %} {{ vh }}{% endfor %}{% endif %};
{% endif %}
access_log /var/log/nginx/{{ item.servername }}_access_ssl.log;