From 5de59917cd83e46af7f47f5da0e9b1759e6d08d7 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 4 Nov 2018 19:50:48 +0100 Subject: [PATCH] Add fallback nginx host --- basic/etc/nginx/conf.d/default.conf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/basic/etc/nginx/conf.d/default.conf b/basic/etc/nginx/conf.d/default.conf index b4a6271..7bea2f9 100644 --- a/basic/etc/nginx/conf.d/default.conf +++ b/basic/etc/nginx/conf.d/default.conf @@ -36,3 +36,26 @@ server { return 200 "vm-pong"; } } + +server { + listen [::]:443 ssl http2; + server_name ~^(.*)\.spotter\.vm$; + + location / { + return 503; + } + + location /static { + root /usr/share/vmmgr; + } + + error_page 503 /503.html; + location = /503.html { + root /usr/share/vmmgr/templates; + } + + location = /vm-ping { + add_header Content-Type text/plain; + return 200 "vm-pong"; + } +}