diff --git a/caddy/readme.md b/caddy/readme.md index f3c3360..bf4ac7c 100644 --- a/caddy/readme.md +++ b/caddy/readme.md @@ -42,3 +42,13 @@ You can setup this rule for multiple domains by either writing them space sepera `{uri}` specified at the end of domain name preserves the path from the URL user entered. Now if anyone visits your website via server's IP address or using `www` subdomain they will be redirected to your root domain. **It just looks cleaner.** + +## Multiple file caddy config + +Caddy supports writing config in multiple files so that we don't polluting our main config. Just import all other caddy configs to the main caddy config. +Usually we can structure our config files in any way it doesn't matter. But there are some common ways to structure it. + +Place all other config files inside `/etc/caddy/conf.d/` directory and import Caddyfile from this directory to main config file. +```Caddyfile +import conf.d/*.Caddyfile +```