diff --git a/machines/moritz-server/reverse-proxy.nix b/machines/moritz-server/reverse-proxy.nix index 7b09040..e01b3f8 100644 --- a/machines/moritz-server/reverse-proxy.nix +++ b/machines/moritz-server/reverse-proxy.nix @@ -54,19 +54,11 @@ enable = true; recommendedProxySettings = true; virtualHosts = { - "moritzboeh.me" = { - serverAliases = ["*.moritzboeh.me"]; + ".moritzboeh.me" = { locations."/" = { proxyPass = "http://192.168.0.6"; }; }; - "moritz.foo" = { - forceSSL = true; - useACMEHost = "moritz.foo"; - locations."/" = { - return = "301 https://www.moritz.foo"; - }; - }; "www.moritz.foo" = { forceSSL = true; useACMEHost = "any.moritz.foo"; @@ -77,6 +69,21 @@ return = "200 'Hello World'"; }; }; + "moritz.foo" = { + forceSSL = true; + useACMEHost = "moritz.foo"; + locations."/" = { + return = "301 https://www.moritz.foo"; + }; + }; + "_" = { + forceSSL = true; + default = true; + useACMEHost = "any.moritz.foo"; + locations."/" = { + return = "404 'Not found!'"; + }; + }; }; streamConfig = '' upstream diskstation {