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 = [ {