There have to be two different import directives. One in the global block, and one outside of it. Otherwise setting new global options won't work, since the Caddyfile syntax demands the global options block as first in the file.
{
# Include all .global files from caddy.d directory
import /usr/local/etc/caddy/caddy.d/*.global
}
# Include all .conf files from caddy.d directory
import /usr/local/etc/caddy/caddy.d/*.conf
[x] Adjust the Caddyfile template to generate them properly.
There have to be two different import directives. One in the global block, and one outside of it. Otherwise setting new global options won't work, since the Caddyfile syntax demands the global options block as first in the file.