Modern CMS’ will flick a switch that sets the index.php to serve a maintenance page rather than the usual homepage. WordPress is a good example of that.
Otherwise the simplest way is to have a maintenance site handy in another webroot, change the root directive for the site in question, and reload the Caddy config (USR1 signal on Linux).
Yes, switching root is good advice. Thanks. This is also probably sufficient for the use-case of Caddy reverse-proxying other sites, although it could get complicated if there are many origin sites.
( Not sure about that usage of the word ‘modern’? )
It’s there to hedge against the non-zero possibility of older systems using other methods I’m unaware of in the past. It is not incorrect to include it