Role service-nginx-meshviewer: add additional domains
Our meshes structure only supports two domains (internal/external). This adds a list called `meshviewer_additional_domains` which will be prefixed with `map.` and redirected to the main Meshviewer domain.
This commit is contained in:
parent
fb2c6cb07a
commit
876c93737d
2 changed files with 28 additions and 0 deletions
|
@ -25,3 +25,6 @@ alertmanager_opts: "--web.external-url=https://{{ http_prometheus_prefix }}.{{ h
|
|||
|
||||
yanic_blacklist:
|
||||
- 98ded0c5e0c0
|
||||
|
||||
meshviewer_additional_domains:
|
||||
- freifunk-wiesbaden.de
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue