From 21e4c7b117b0807f1da247db3d8cbcee39ed62ac Mon Sep 17 00:00:00 2001 From: SCHAUAUS GmbH Date: Sat, 4 Apr 2026 11:11:36 +0000 Subject: [PATCH] Caddyfile Einstellungen zu README.md hinzu --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 90e49f2..0349d33 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,43 @@ Bei jedem Downloadversuch wird der Downloadzähler *downloads* um 1 erhöht. Wir ## Einstellungen Caddy Webserver {#Caddy-Config} +``` +tresor.example.com { + #PHP + php_fastcgi unix//run/php/php-fpm.sock + + # Root directory + root * /Pfad/Zu/DigiErbe/Tresor/public + + # Authentication + basic_auth / { + username $2a$14$SetHashedPasswordHere + } + + # Activate file server in Caddy + file_server + + # Redirect all requests to index.php + try_files {path} /index.php + + # Security headers + header { + -Server + X-Content-Type-Options "nosniff" + X-Frame-Options "DENY" + X-XSS-Protection "1; mode=block" + } + + # Add authenticated username as HTTP Header to the request + header_down +X-WEBAUTH-USER {http.auth.user.id} + + # Protokoll + log { + output file /var/log/caddy/DigiErbe/tresor.log + } +} +``` + ### Benutzer anlegen {#addUser} ### Konfiguration neu einlesen {#Caddy-Reload}