about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaweł Dybiec <pawel.to.malpa@gmail.com>2020-03-13 22:50:53 +0100
committerPaweł Dybiec <pawel.to.malpa@gmail.com>2020-03-13 22:50:53 +0100
commitd4167c248409515c10b1e92fb3eaa938e5fe4788 (patch)
tree3238b5fa04a6561c3cfa628fd28e31703cfc646f
parentMake vpn restart always (diff)
Add support for multiple aliases
-rw-r--r--domains.yml2
-rw-r--r--templates/nginx.conf.j22
2 files changed, 3 insertions, 1 deletions
diff --git a/domains.yml b/domains.yml
index e696bd0..154785e 100644
--- a/domains.yml
+++ b/domains.yml
@@ -18,6 +18,7 @@ domains:
       port: 5003
   octoprint:
     name: "octoprint.dybiec.info"
+    aliases: ["creality.dybiec.info"]
     http_redirect: true
     websocket: true
     client_body_size: 200M
@@ -28,6 +29,7 @@ domains:
       cache: true
   octoprint2:
     name: "octoprint2.dybiec.info"
+    aliases: ["prusa.dybiec.info"]
     http_redirect: true
     websocket: true
     client_body_size: 200M
diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2
index 60987fa..2927af8 100644
--- a/templates/nginx.conf.j2
+++ b/templates/nginx.conf.j2
@@ -15,7 +15,7 @@ server {
   listen 80;
 {% endif %}
   listen 443 ssl http2;
-  server_name {{ server.name }};
+  server_name {{ server.name }} {{server.aliases|default([])| join(' ')}};
 
   location / {