From 20d87c04742636c8702bae5049bef0ef07dfb595 Mon Sep 17 00:00:00 2001 From: nexxo Date: Thu, 30 Jul 2026 22:34:15 +0200 Subject: [PATCH] Put the files hostname in the reference proxy configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FILES_HOST tells Laravel which hostname to bind the routes to. It does not make the reverse proxy terminate TLS for that name or forward it anywhere, and the live server showed exactly that gap: DNS correct, the right machine, port 80 answering — and a TLS handshake that fails because no certificate exists for the name. The block carries two things the other public names do not have to think about. No console allowlist. The archive is fetched by a server in a RESCUE SYSTEM: a machine with no tunnel and a public address that is in nobody's allow list. The console's network lock here would be a lock against the only caller that needs it. The protection lives in the application instead — no valid one-time code, 404 — and the legal documents are public by intent. And no `http://… { abort }` either, unlike admin and ws below it. Those two hide that they exist; this one is meant to be known, and killing port 80 takes the path away from an ACME check on the day Caddy's own challenge handler is not the first thing to answer. Co-Authored-By: Claude Opus 5 --- deploy/caddy/Caddyfile.example | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/deploy/caddy/Caddyfile.example b/deploy/caddy/Caddyfile.example index bbca7f6..4ff93f1 100644 --- a/deploy/caddy/Caddyfile.example +++ b/deploy/caddy/Caddyfile.example @@ -93,6 +93,28 @@ status.example.com { reverse_proxy 127.0.0.1:8080 } +# ── Dateien zum Herunterladen ──────────────────────────────────────────────── +# FILES_HOST aus der .env. Zwei Dinge liegen hier, und beide müssen von überall +# erreichbar sein: +# +# - Rechtsdokumente (AGB, AV, TOM). Ihre Adressen stehen in Verträgen und auf +# Rechnungen und müssen Jahre halten. +# - Das Bootstrap-Archiv für die Host-Übernahme. Es wird von einem Server im +# RETTUNGSSYSTEM geholt — einer Maschine ohne Tunnel, mit einer öffentlichen +# Adresse, die in keiner Freigabeliste steht. Genau deshalb steht hier KEIN +# `import clupilot-console-allow.conf`: die Sperre der Konsole wäre hier die +# Sperre gegen den einzigen, der es braucht. +# +# Der Schutz sitzt in der Anwendung, nicht im Proxy: ohne gültigen Einmal-Code +# antwortet das Archiv mit 404, und die Dokumente sind ohnehin öffentlich. +# +# Auch KEIN `http://… { abort }` wie bei admin und ws weiter unten. Dieser Name +# soll bekannt sein — und ein abgewürgtes Port 80 nimmt der ACME-Prüfung den +# Weg, wenn Caddys eigener Handler einmal nicht als Erster drankommt. +files.example.com { + reverse_proxy 127.0.0.1:8080 +} + # Plain HTTP for the two hidden names. Without this Caddy answers port 80 with # an automatic redirect to https, which announces that both hostnames are # served here — the one thing this file exists to avoid. The ACME challenge is