From 9e3cf0bcc867f0a18f4482ea993032d0b741cdce Mon Sep 17 00:00:00 2001 From: sils Date: Mon, 27 Nov 2023 18:02:30 +0100 Subject: fix(system/services/etebase): micellanous changes to make it work --- system/services/etebase/default.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'system/services') diff --git a/system/services/etebase/default.nix b/system/services/etebase/default.nix index 964ea59..e8a3d81 100644 --- a/system/services/etebase/default.nix +++ b/system/services/etebase/default.nix @@ -4,7 +4,10 @@ port = 8001; settings = { global.secret_file = "${config.age.secrets.etebase-server.path}"; - allowed_hosts.allowed_host1 = "127.0.0.1"; + allowed_hosts = { + allowed_host1 = "etebase.vhack.eu"; + allowed_host2 = "dav.vhack.eu"; + }; }; }; @@ -20,14 +23,13 @@ enableACME = true; forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${builtins.toString config.services.etebase-server.port}"; - extraConfig = '' - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - ''; + locations = { + "/static" = { + root = config.services.etebase-server.settings.global.media_root; + }; + "/" = { + proxyPass = "http://127.0.0.1:${builtins.toString config.services.etebase-server.port}"; + }; }; serverAliases = [ "dav.vhack.eu" -- cgit 1.4.1