@marcel91200 / caddy Mirror · read-only
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 11, 01:00 UTC

master
caddyfiletest 87 lines 1.22 KB
Raw
1 (logging) {
2 log {
3 output file /var/log/caddy/{args[0]}.access.log
4 }
5 }
6
7 a.example.com {
8 import logging a.example.com
9 }
10
11 b.example.com {
12 import logging b.example.com
13 }
14 ----------
15 {
16 "logging": {
17 "logs": {
18 "default": {
19 "exclude": [
20 "http.log.access.log0",
21 "http.log.access.log1"
22 ]
23 },
24 "log0": {
25 "writer": {
26 "filename": "/var/log/caddy/a.example.com.access.log",
27 "output": "file"
28 },
29 "include": [
30 "http.log.access.log0"
31 ]
32 },
33 "log1": {
34 "writer": {
35 "filename": "/var/log/caddy/b.example.com.access.log",
36 "output": "file"
37 },
38 "include": [
39 "http.log.access.log1"
40 ]
41 }
42 }
43 },
44 "apps": {
45 "http": {
46 "servers": {
47 "srv0": {
48 "listen": [
49 ":443"
50 ],
51 "routes": [
52 {
53 "match": [
54 {
55 "host": [
56 "a.example.com"
57 ]
58 }
59 ],
60 "terminal": true
61 },
62 {
63 "match": [
64 {
65 "host": [
66 "b.example.com"
67 ]
68 }
69 ],
70 "terminal": true
71 }
72 ],
73 "logs": {
74 "logger_names": {
75 "a.example.com": [
76 "log0"
77 ],
78 "b.example.com": [
79 "log1"
80 ]
81 }
82 }
83 }
84 }
85 }
86 }
87 }