about summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorPjotr Prins <pjotr.public01@thebird.nl>2026-12-01 12:27:39 +0000
committerPjotr Prins <pjotr.public01@thebird.nl>2026-12-01 12:27:39 +0000
commita13b63a3bd5ce7dda0af9bf13b7e83e4f431934b (patch)
treef35308ef4df89bc5e5557e0c51eaf3fd4aacb525 /docs
parent3a5a0b088b6b5ee9d3f6501582dcffc3eb5ed83a (diff)
downloadgenenetwork4-a13b63a3bd5ce7dda0af9bf13b7e83e4f431934b.tar.gz
nginx: one site for two names, and why certbot broke it
certbot --nginx inserted its TLS directives into the port-80 redirect block and
left the redirect in place, so that block became a :443 server whose first
directive was `return 301 https://romeral.systemsgenetics.org$request_uri;'.
It also claimed both server_names, and nginx serves a request from the first
block that matches: every HTTPS request was answered by that redirect, romeral
redirected to itself in a loop, and vesuvio was served romeral's certificate
and shadowed its own block.

So: one :80 server for both names that redirects to $host (a hardcoded name
sends each site's visitors to the other) and answers ACME on both ports, and
one :443 server for both names with a certificate that has to cover both --
the header says how to expand it and that certbot must not add a second block.

Also added: the Cloudflare ranges as trusted real-IP sources, or every access
line and the per-address limit_conn count Cloudflare's edge instead of the
visitor, and the root hang's `return 444' alternative in the comment where the
524 that Cloudflare turns it into is explained.

Verified with a scratch nginx on the host (paths and ports stubbed, self-signed
cert): syntax ok; https /gn4/version 200 on both names; http redirects to the
name that was asked for; https root held until the client gave up.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions