1

vm: redirect /admin to a different vhost

This commit is contained in:
Motiejus Jakštys 2024-01-25 10:15:44 +02:00
parent 27de639bc5
commit 51e12c5323

6
vm.nix
View File

@ -17,6 +17,10 @@
auto_https off
debug
'';
virtualHosts.":8001".extraConfig = lib.mkForce ''
redir /admin/ http://{host}:8003{uri}
${builtins.readFile "${pkgs.e11sync-caddyfile}"}
'';
virtualHosts."http://:8003".extraConfig = lib.mkForce ''
redir / /admin/
${builtins.readFile "${pkgs.e11sync-caddyfile}"}
@ -56,7 +60,7 @@
services.getty.autologinUser = "nixos";
networking = {
hostName = "vm";
firewall.allowedTCPPorts = [22 8001];
firewall.allowedTCPPorts = [8001 8003];
};
system.stateVersion = "23.11";
}