From f9e576ee0ffe649303f6cfbd429f87729f20edfc Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 29 Aug 2021 09:17:34 +0200 Subject: [PATCH] add preview of techblog --- configs/sputnik/nginx.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/configs/sputnik/nginx.nix b/configs/sputnik/nginx.nix index 70a836f..1c95e13 100644 --- a/configs/sputnik/nginx.nix +++ b/configs/sputnik/nginx.nix @@ -192,6 +192,37 @@ in { } // error.locations; }; + "preview.tech.ingolf-wagner.de" = { + listen = [ + { + addr = "0.0.0.0"; + port = 4443; + ssl = true; + } + { + addr = "0.0.0.0"; + port = 80; + ssl = false; + } + ]; + forceSSL = true; + enableACME = true; + extraConfig = error.extraConfig; + locations = { + "/" = { + basicAuth.moderator = "IwantitIwantitIwantit"; + root = "/srv/www/tech_preview"; + extraConfig = '' + if (-d $request_filename) { + rewrite [^/]$ $scheme://$http_host$request_uri/ permanent; + } + ''; + }; + } // error.locations; + }; + + + "terranix.org" = { listen = [ {