Put the files hostname in the reference proxy configuration

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 <noreply@anthropic.com>
feature/host-bootstrap
nexxo 2026-07-30 22:34:15 +02:00
parent 398028a57d
commit 20d87c0474
1 changed files with 22 additions and 0 deletions

View File

@ -93,6 +93,28 @@ status.example.com {
reverse_proxy 127.0.0.1:8080 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 # 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 # 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 # served here the one thing this file exists to avoid. The ACME challenge is