hswaw/machines/customs: implement inventory redirect

Change-Id: I1ae6f829aaf7a6de4f21a93303e8703bdadebdbd
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1885
Reviewed-by: palid <palid@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
changes/85/1885/3
informatic 2024-01-30 22:29:17 +01:00 committed by informatic
parent 0f88591885
commit 9ebbf6d2ba
3 changed files with 11 additions and 3 deletions

View File

@ -2,7 +2,6 @@
let
beyondspaceDomains = {
"inventory.waw.hackerspace.pl" = "https";
"vending.waw.hackerspace.pl" = "https";
"label.waw.hackerspace.pl" = "http";
};
@ -99,4 +98,13 @@ in with lib; {
default = true;
locations."/".root = ./default-vhost;
};
# legacy inventory URL redirect
services.nginx.virtualHosts."inventory.waw.hackerspace.pl" = {
addSSL = true;
enableACME = true;
serverAliases = [ "inventory.waw.hackerspace.pl" "i.waw.hackerspace.pl" ];
locations."/".return = "302 https://inventory.hackerspace.pl$request_uri";
};
services.nginx.virtualHosts."i".locations."/".return = "302 https://inventory.hackerspace.pl$request_uri";
}

View File

@ -12,4 +12,4 @@ i IN SOA customs.waw.hackerspace.pl. bofh.hackerspace.pl. (
$ORIGIN i.
$TTL 300
@ IN A 10.8.1.38
@ IN A 10.8.1.2

View File

@ -51,7 +51,7 @@ mate CNAME vending
transcend A 10.8.1.33
welcomer A 10.8.1.34
arcade A 10.8.1.35
inventory A 10.8.1.38
inventory A 10.8.1.2
i CNAME inventory
camera A 10.8.1.39
franciszek A 10.8.0.205