vm: redirect /admin to a different vhost
This commit is contained in:
parent
27de639bc5
commit
51e12c5323
6
vm.nix
6
vm.nix
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue