@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 168 lines 2.69 KB
Raw
1 {
2 skip_install_trust
3 pki {
4 ca {
5 name "Local"
6 root_cn "Custom Local Root Name"
7 intermediate_cn "Custom Local Intermediate Name"
8 root {
9 cert /path/to/cert.pem
10 key /path/to/key.pem
11 format pem_file
12 }
13 intermediate {
14 cert /path/to/cert.pem
15 key /path/to/key.pem
16 format pem_file
17 }
18 }
19 ca foo {
20 name "Foo"
21 root_cn "Custom Foo Root Name"
22 intermediate_cn "Custom Foo Intermediate Name"
23 }
24 }
25 }
26
27 a.example.com {
28 tls internal
29 }
30
31 acme.example.com {
32 acme_server {
33 ca foo
34 }
35 }
36
37 acme-bar.example.com {
38 acme_server {
39 ca bar
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 "acme-bar.example.com"
57 ]
58 }
59 ],
60 "handle": [
61 {
62 "handler": "subroute",
63 "routes": [
64 {
65 "handle": [
66 {
67 "ca": "bar",
68 "handler": "acme_server"
69 }
70 ]
71 }
72 ]
73 }
74 ],
75 "terminal": true
76 },
77 {
78 "match": [
79 {
80 "host": [
81 "acme.example.com"
82 ]
83 }
84 ],
85 "handle": [
86 {
87 "handler": "subroute",
88 "routes": [
89 {
90 "handle": [
91 {
92 "ca": "foo",
93 "handler": "acme_server"
94 }
95 ]
96 }
97 ]
98 }
99 ],
100 "terminal": true
101 },
102 {
103 "match": [
104 {
105 "host": [
106 "a.example.com"
107 ]
108 }
109 ],
110 "terminal": true
111 }
112 ]
113 }
114 }
115 },
116 "pki": {
117 "certificate_authorities": {
118 "bar": {
119 "install_trust": false
120 },
121 "foo": {
122 "name": "Foo",
123 "root_common_name": "Custom Foo Root Name",
124 "intermediate_common_name": "Custom Foo Intermediate Name",
125 "install_trust": false
126 },
127 "local": {
128 "name": "Local",
129 "root_common_name": "Custom Local Root Name",
130 "intermediate_common_name": "Custom Local Intermediate Name",
131 "install_trust": false,
132 "root": {
133 "certificate": "/path/to/cert.pem",
134 "private_key": "/path/to/key.pem",
135 "format": "pem_file"
136 },
137 "intermediate": {
138 "certificate": "/path/to/cert.pem",
139 "private_key": "/path/to/key.pem",
140 "format": "pem_file"
141 }
142 }
143 }
144 },
145 "tls": {
146 "automation": {
147 "policies": [
148 {
149 "subjects": [
150 "acme-bar.example.com",
151 "acme.example.com"
152 ]
153 },
154 {
155 "subjects": [
156 "a.example.com"
157 ],
158 "issuers": [
159 {
160 "module": "internal"
161 }
162 ]
163 }
164 ]
165 }
166 }
167 }
168 }