]> mop.ddnsfree.com - git repositories - brisk.git/commit
answer with a static page when the daemon cannot be reached
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Wed, 7 Oct 2026 07:22:27 +0000 (09:22 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Wed, 7 Oct 2026 07:22:27 +0000 (09:22 +0200)
commitd4e8aab75cf73e97fdeff55f44bfa7a9cb99a73c
tree0551e20a4f3f538999200fe49d2f74ac6ff445be
parenta27fe11b1502878eeb82d8826c3f505b115935ba
answer with a static page when the daemon cannot be reached

The daemon urls fell back on error.php for 502, 503 and 504. error.php
needs php-fpm and the database, and when the front sends its php pages to
the daemon machine those are down together with the daemon: the courtesy
page failed exactly when it was needed, and the browser got a bare error.

daemon-down.html carries the same message with no php at all, and reloads
the room after 15 to 25 seconds, as error.php does, so that the players do
not all knock in the same instant when the daemon comes back; a meta
refresh covers browsers without javascript. The banners of error.php are
left out.

nginx serves it with an internal redirect, so the browser still shows the
url it asked for, briskin5/index.php included: every path in the page goes
through <base>, which INSTALL.sh rewrites with the prefix, as it does for
cookiepath. It is installed with -m full and -m front, where nginx runs,
not with -m server. The generated nginx-<name>-daemon.inc and the
brisk-daemon.inc template point error_page at it.

Checked with a -m front installation whose daemon ports are closed: every
daemon url, briskin5 and a POST to index_wr.php included, answers with the
page and keeps the 502 status, and the images it asks for answer 200.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
INSTALL.sh
system/nginx/brisk-daemon.inc
system/nginx/brisk.conf
web/daemon-down.html [new file with mode: 0644]