--proxy snippets: nginx routes 443 by name, the server serves its own names #49

Merged
jcoffey-dev merged 2 commits from fix/48-nginx-sni-passthrough into main 2026-11-08 22:45:49 +00:00
2 Commits
Author SHA1 Message Date
jcoffey-dev 673f63302f e2e: an older --proxy snippets install, moved over with --key (#48)
ci / test (pull_request) Successful in 1m19s
proxy-snippets-upgrade.sh installs with the installer before #48 (OLD_REF),
runs this one without a key (the layout stays, and says how to move), then
with one (the router is written, the server's names pass through). The
second-run check in proxy-snippets.sh allows the server a new self-signed
certificate: what matters is that it is still the server's.
2026-11-08 12:47:36 -07:00
jcoffey-dev 2da8df0289 --proxy snippets: nginx routes 443 by name, the server serves its own names (#48)
The nginx file terminated TLS for the server's names with a certificate the
operator supplied, for the names known at install time only. A domain added
later got the wrong certificate on 443, its HTTP-01 challenges weren't
forwarded on port 80, and the server's _443._tcp TLSA records described a
certificate nobody was served.

nginx now routes 443 by name, in nginx-inbuxa-stream.conf (stream,
ssl_preread). The console and the webmail go to nginx's own TLS on
127.0.0.1:8444; every other name goes, untouched and with the PROXY protocol
header, to the server's own HTTPS listener on 127.0.0.1:8443. That listener
is fitted by the installer (jmap.PassThroughListener): bound on loopback on
the host, or kept on the container's 443 and published on 127.0.0.1:8443,
and taking PROXY only from where nginx connects. Port 80 also passes the
challenges of the four service names of any domain.

An install from before keeps its layout, since a new file in front of an
unfitted server would break its names at the next reload. Running install
again with --key fits the listener and moves it over; the install record
notes it (passThrough). A move between shapes fits it again.

Caddy can't route by name without a plugin, so its fragment says what that
means for domains added later and TLSA.
2026-11-08 12:24:54 -07:00