My overall experience with Caddy + Some ideas

I just wanted to expand on this, since I’m seeing very similar request here and wanted to add my own on record.

Dynamic loading of Caddyfiles per domain.

What is the benefit of this? Or, in other words, what is wrong with signaling Caddy?

For those familiar with Apache .htaccess override files, this is what multiple folks are requesting. An ability to customize config for certain portion of the site without editing the main config file. This is useful in shared hosting scenarios (where you don’t want multiple users editing main config). This is very similar to per-domain config. Since some sites are hosted off the same file system, different site merely reside in different folders.

Would you allow any user of a shared webhosting system to edit main Caddy config file and affect all other sites/users? Would you allow any user to send signals to Caddy instance with same consequence?

One way this can be accomplish is described here by me:

Where you can optionally check the filesystem upon each request for presence of override files to the main config. Augment the in-memory config tree (or config hash or whatever data-structure) and present this new configs structure to any subsequently invoked extensions. Thus minimizing impact on existing extensions. As far as extensions would care at this point is your Caddy server was loaded without any overrides.

This feature would be optionally enabled. Thus alleviating any concerns for performance hits for those of you who don’t care for it.

service caddy restart isn’t something I recognize. What is it?

Most Linux webserver packages come with startup scripts to allow ease of administration. Some OS’s use utilities like (service or systemctl) to start/stop/enable-at-boot various services. service is just a wrapper utility that redirects to init/systemd scripts.

Personally I don’t find the file system itself to be a reliable configuration manager.