mirror of
https://github.com/caddyserver/website.git
synced 2025-05-07 12:17:15 -04:00
Change for more generic example
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
parent
4ce70d6739
commit
6f3cf1b040
1 changed files with 5 additions and 6 deletions
|
@ -279,17 +279,16 @@ The [`import`](/docs/caddyfile/directives/import) directive can also be used to
|
||||||
You can pass arguments to imported configuration and use them like so:
|
You can pass arguments to imported configuration and use them like so:
|
||||||
|
|
||||||
```caddy
|
```caddy
|
||||||
(log_common) {
|
(snippet) {
|
||||||
log {
|
respond "Yahaha! You found {args.0}!"
|
||||||
output file /var/log/caddy/{args.0}.access.log
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.example.com {
|
a.example.com {
|
||||||
import log_common a.example.com
|
import snippet "Example A"
|
||||||
}
|
}
|
||||||
|
|
||||||
b.example.com {
|
b.example.com {
|
||||||
import log_common b.example.com
|
import snippet "Example B"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue