diff --git a/inventory/group_vars/monitoring b/inventory/group_vars/monitoring index f448055..b52562f 100644 --- a/inventory/group_vars/monitoring +++ b/inventory/group_vars/monitoring @@ -25,3 +25,6 @@ alertmanager_opts: "--web.external-url=https://{{ http_prometheus_prefix }}.{{ h yanic_blacklist: - 98ded0c5e0c0 + +meshviewer_additional_domains: + - freifunk-wiesbaden.de diff --git a/roles/service-nginx-meshviewer/templates/meshviewer_vhost.conf.j2 b/roles/service-nginx-meshviewer/templates/meshviewer_vhost.conf.j2 index 595890a..c8ee8cc 100644 --- a/roles/service-nginx-meshviewer/templates/meshviewer_vhost.conf.j2 +++ b/roles/service-nginx-meshviewer/templates/meshviewer_vhost.conf.j2 @@ -86,3 +86,28 @@ server { {% endif %} {% endif %} {% endfor %} + +{% if meshviewer_additional_domains is defined %} +{% for domain in meshviewer_additional_domains %} +server { + listen 80; + listen [::]:80; + server_name {{ http_meshviewer_prefix }}.{{ domain }}; + return 301 https://{{ http_meshviewer_external }}$request_uri; + + include /etc/nginx/snippets/letsencrypt-acme-challenge.conf; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name {{ http_meshviewer_prefix }}.{{ domain }}; + return 301 https://{{ http_meshviewer_external }}$request_uri; + + include /etc/nginx/snippets/letsencrypt-acme-challenge.conf; +} +{% if not loop.last %} + +{% endif %} +{% endfor %} +{% endif %}