Merge branch 'claude/relaxed-faraday-h4zd09' of https://github.com/pablovolenski/vienalatina

This commit is contained in:
admin 2026-10-08 19:03:17 +00:00
commit b5a17f3505
2 changed files with 51 additions and 29 deletions

View File

@ -39,18 +39,34 @@ Check propagation (repeat until it prints the server IP):
local$ dig +short git.vienalatina.com local$ dig +short git.vienalatina.com
``` ```
### 1.1 A second domain that leads here ### 1.1 The other two domains
`vielac.at` is where the WordPress site this project replaced used to live, and `vielac.at` is where the WordPress site this project replaced used to live;
it redirects: everything that arrives goes to the same path on vienalatina.com, `vienalatina.net` is the .com's sibling. Both redirect: everything that arrives
where the 301s for old WordPress paths catch it. Pointing it here is also what goes to the same path on vienalatina.com, where the 301s for old WordPress paths
takes the last traffic off the old box. Two A records in that domain's **zone catch it. Pointing them here is also what takes the last traffic off the old box.
editor**, both at the server:
| Name | Type | Value | TTL | In **each** of those two zones, four rows change and **nothing else**:
| Name | Type | Was | Becomes |
|---|---|---|---| |---|---|---|---|
| `@` | A | `<SERVER-IP>` | 300 | | `@` | A | the old box | `<SERVER-IP>`, TTL 300 |
| `www` | A | `<SERVER-IP>` | 300 | | `www` | A | the old box | `<SERVER-IP>`, TTL 300 |
| `@` | AAAA | the old box's IPv6 | **deleted** |
| `www` | AAAA | the old box's IPv6 | **deleted** |
**The AAAA rows are the trap.** A browser with IPv6 prefers it to IPv4, so
leaving them behind means the A records change, the old site keeps appearing,
and nothing on screen explains why. Delete them unless this server has an IPv6
address of its own (`ip -6 addr show scope global`), in which case use that.
**Leave the mail rows exactly as they are** — `MX`, the four `SRV`s, `CNAME
autoconfig`, the SPF `TXT`, and the DKIM `TXT` that vienalatina.net carries.
They point at Hetzner's mail server and have nothing to do with which machine
serves the website. **And never copy** `NS` or `SOA` between zones (every zone
has its own), nor the `ci` and `git` A rows, which are vienalatina.com
subdomains with their own site blocks: a `git.vielac.at` would resolve here,
find no block, and fail the TLS handshake.
**Not the nameserver page.** On Hetzner's Konsole H those fields hand the whole **Not the nameserver page.** On Hetzner's Konsole H those fields hand the whole
zone to another provider's DNS, which is a different thing entirely and turns zone to another provider's DNS, which is a different thing entirely and turns
@ -78,13 +94,17 @@ sudo systemctl reload caddy
between a typo in that file and vienalatina.com going down with it. between a typo in that file and vienalatina.com going down with it.
```sh ```sh
curl -sI https://vielac.at/ | head -3 # 301 → vienalatina.com dig +short vielac.at A vienalatina.net A # both: this server
curl -sI https://www.vielac.at/page/agenda/ | grep -i location # the path survives dig +short vielac.at AAAA vienalatina.net AAAA # nothing at all
curl -sI https://vienalatina.com/ | head -1 # 200, unchanged curl -sI https://vielac.at/ | head -3 # 301 → vienalatina.com
curl -sI https://www.vienalatina.net/page/agenda/ | grep -i location # the path survives
curl -sI https://vienalatina.com/ | head -1 # 200, unchanged
dig +short vienalatina.com MX # mail, still answering
``` ```
The third is the one that matters. A Caddyfile edit that breaks the site it was The last two are the ones that matter. A Caddyfile edit that breaks the site it
meant to leave alone is the failure this ordering exists to prevent. was meant to leave alone, or a DNS session across three zones that takes the
mailbox with it, are the two failures this ordering exists to prevent.
## 2. First login + basic hardening ## 2. First login + basic hardening

View File

@ -21,23 +21,25 @@ www.vienalatina.com {
redir https://vienalatina.com{uri} 301 redir https://vienalatina.com{uri} 301
} }
# The old site's own domain. vielac.at is where the WordPress install this # The other names the association answers to. vielac.at is where the WordPress
# project replaced used to live — it is the address in every link shared before # install this project replaced used to live — it is the address in every link
# the cutover, in every search result that has not been recrawled, and in the # shared before the cutover, in every search result not yet recrawled, and in
# bookmarks of everybody who read it. # the bookmarks of everybody who read it. vienalatina.net is the .com's sibling.
# #
# Both spellings in one block, and 301 rather than 302: a permanent redirect is # All four spellings in one block, and 301 rather than 302: a permanent redirect
# what makes a search engine fold the two names into one site instead of # is what makes a search engine fold them into one site instead of indexing four
# indexing them as duplicates of each other, and what makes a browser stop # copies of each other, and what makes a browser stop asking after the first
# asking after the first visit. `{uri}` carries the path, so a link somebody # visit. `{uri}` carries the path, so a link somebody shared to
# shared to vielac.at/page/agenda/ lands on the agenda rather than on the home # vielac.at/page/agenda/ lands on the agenda rather than on the home page — and
# page — and an old WordPress path arrives at vienalatina.com and is caught by # an old WordPress path arrives at vienalatina.com and is caught by the 301s
# the 301s further down, which is one set of rules rather than two. # further down, which is one set of rules rather than three.
# #
# Caddy asks Let's Encrypt for this certificate the first time the name # Caddy asks Let's Encrypt for each certificate the first time that name
# resolves to this server, so the A records go in before this file is reloaded. # resolves to this server, so this block can be deployed while the names still
# Until they do, the block is harmless: nothing reaches it. # point elsewhere: nothing reaches it until they move, and when they do the
vielac.at, www.vielac.at { # certificate is fetched on the first request rather than after a second trip
# to the server.
vielac.at, www.vielac.at, vienalatina.net, www.vienalatina.net {
redir https://vienalatina.com{uri} 301 redir https://vienalatina.com{uri} 301
} }