From 3d2f4172a51ed920cb783a350f35058c19915465 Mon Sep 17 00:00:00 2001 From: mikl Date: Tue, 28 Jul 2026 13:08:14 +0300 Subject: [PATCH] heather/caddy: add /files/* static file_server on iscg.dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Для раздачи временных файлов (например v2RayTun.zip) прямой https-ссылкой. handle_path stripает /files/ prefix, file_server раздаёт из /var/www/files/. Не конфликтует с matrix (использует /_matrix/*, /.well-known/matrix). --- hosts/heather/caddy.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/heather/caddy.nix b/hosts/heather/caddy.nix index d53e2b7..99f02ba 100644 --- a/hosts/heather/caddy.nix +++ b/hosts/heather/caddy.nix @@ -61,6 +61,13 @@ in { # Matrix tuwunel (homeserver) "iscg.dev".extraConfig = '' + # Static file sharing (https://iscg.dev/files/). + # handle_path stripает /files/ prefix → file_server ищет в root. + # Не конфликтует с matrix (использует /_matrix/*, /.well-known/matrix). + handle_path /files/* { + root * /var/www/files + file_server + } reverse_proxy 127.0.0.1:8008 encode zstd gzip '';