From 9c2997d5e5fd4e656fe2bbbbd13672288b8b592b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 10 Apr 2026 15:56:49 +0300 Subject: snonux.foo: route to Pi backends at /snonux, redirect www - relayd: route www.snonux.foo to localhost for redirect, keep bare/standby on f3s_static_proxy - httpd: www.snonux.foo returns 302 redirect to snonux.foo - gogios: monitor pi0/pi1 via wg0.wan.buetow.org instead of lan.buetow.org - AGENTS.md: document Pi lighttpd Host-based virtual hosting pattern Amp-Thread-ID: https://ampcode.com/threads/T-019d7766-909d-741c-bcb9-1e1e931f1e1b Co-authored-by: Amp --- frontends/AGENTS.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'frontends/AGENTS.md') diff --git a/frontends/AGENTS.md b/frontends/AGENTS.md index b62b2a3..23e90c2 100644 --- a/frontends/AGENTS.md +++ b/frontends/AGENTS.md @@ -252,6 +252,17 @@ Monitoring should match that split: - `lighttpd` is intentionally used on the Pi HTTP nodes because the hardware is low-RAM and the workload is static content only - Firewall changes on the Pis are conditional: check `firewall-cmd --state` first and skip `firewall-cmd` rules entirely if `firewalld` is not running +### Pi lighttpd Host-Based Virtual Hosting + +`relayd` cannot rewrite URL paths — it can only route based on Host header to different backend tables. To serve a subdirectory as the root for a domain, lighttpd on the Pis uses Host-based virtual hosting to remap the document root. + +Config: `/etc/lighttpd/lighttpd.conf` on pi0/pi1 (managed directly, not in a config repo). + +Current vhost mappings: +- `snonux.foo` / `www.snonux.foo` → `/var/www/html/snonux` + +The `Host` header is passed through by relayd unchanged, so lighttpd can match on it directly. + ## Configuration Testing Before deploying: -- cgit v1.2.3