From 556c4a64e707f942609715d44b6ad451b4f2c715 Mon Sep 17 00:00:00 2001 From: ravi Date: Mon, 28 Sep 2026 15:04:36 -0400 Subject: [PATCH] Route eln.ddomlab.org:5000 to eln_server, keeping /pth on PTH The old server answered this address with eln_server, which also mounted the PTH routes. Since the cutover every request here went to the pth container, so the scanner page and the autofill timer got 404s. Send /pth and /pth/* to pth (the sensor and MEDUSA post there) and everything else to the eln-server container, and log this address like the main site. Co-Authored-By: Claude Opus 5.5 --- Caddyfile | 17 ++++++++++++++++- README.md | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Caddyfile b/Caddyfile index 5d1c303..36fa060 100644 --- a/Caddyfile +++ b/Caddyfile @@ -17,6 +17,21 @@ eln.ddomlab.org { } } +# The old lab-server address. The PTH sensor and MEDUSA still post to /pth/... here; +# everything else is eln_server (scanner page, labels, autofill API). eln.ddomlab.org:5000 { - reverse_proxy pth:5000 + @pth path /pth /pth/* + handle @pth { + reverse_proxy pth:5000 + } + handle { + reverse_proxy eln-server:5000 + } + log { + output file /var/log/caddy/eln-5000-access.log { + roll_size 10MiB + roll_keep 10 + roll_keep_for 2160h + } + } } diff --git a/README.md b/README.md index 8a70a61..758fa51 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ HTTPS certificates are obtained and renewed automatically, so no certbot on the |---|---| | `pth.ddomlab.org` | `pth` container (PTH sensor API + dashboard) | | `eln.ddomlab.org` | eLabFTW *(added at cutover)* | -| `eln.ddomlab.org:5000` | `pth` - compatibility for the sensor and MEDUSA *(added at cutover, removed once they are repointed)* | +| `eln.ddomlab.org:5000` | `/pth/...` → `pth` (compatibility for the sensor and MEDUSA); everything else → `eln-server` (eln_server: scanner page, labels, autofill API) | Apps publish no ports of their own; only this project is exposed.