Monviech / os-caddy-plugin

Caddy Plugin with GUI for OPNsense
Other
39 stars 0 forks source link

Adjust import options for Caddyfile (custom configuration files) #20

Closed Monviech closed 11 months ago

Monviech commented 11 months ago

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