diff --git a/hosts/c3d2-web/default.nix b/hosts/c3d2-web/default.nix index 41b85ace..6ced745a 100644 --- a/hosts/c3d2-web/default.nix +++ b/hosts/c3d2-web/default.nix @@ -60,24 +60,30 @@ }; "~ ^/\\.well-known/matrix/client" = { return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.c3d2.de\"}}'"; - extraConfig = '' + extraConfig = /* nginx */ '' default_type application/json; add_header "Access-Control-Allow-Origin" *; ''; }; + "~ ^/schule$".return = "307 /schule/"; + "/schule/" = { + alias = "/var/www/cms-slides/"; + extraConfig = '' + index index.html; + ''; + }; + # SpaceAPI "/status.png".proxyPass = "http://[${hostRegistry.spaceapi.ip6}]:3000/status.png"; "/spaceapi.json".proxyPass = "http://[${hostRegistry.spaceapi.ip6}]:3000/spaceapi.json"; # WKD: Web Key Directory for PGP Keys - "~ ^/openpgp" = { - extraConfig = '' - autoindex off; - default_type "application/octet-stream"; - add_header Access-Control-Allow-Origin "* always"; - ''; - }; + "~ ^/openpgp".extraConfig = '' + autoindex off; + default_type "application/octet-stream"; + add_header Access-Control-Allow-Origin "* always"; + ''; }; }; @@ -89,7 +95,7 @@ enableACME = true; forceSSL = true; root = "/var/www/c3d2/datenspuren"; - extraConfig = '' + extraConfig = /* nginx */ '' index index.html; rewrite ^/$ /2024/ redirect; '';