@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 132 lines 1.85 KB
Raw
1 # https://github.com/caddyserver/caddy/issues/3906
2 a.a {
3 tls internal
4 respond 403
5 }
6
7 http://b.b https://b.b:8443 {
8 tls internal
9 respond 404
10 }
11 ----------
12 {
13 "apps": {
14 "http": {
15 "servers": {
16 "srv0": {
17 "listen": [
18 ":443"
19 ],
20 "routes": [
21 {
22 "match": [
23 {
24 "host": [
25 "a.a"
26 ]
27 }
28 ],
29 "handle": [
30 {
31 "handler": "subroute",
32 "routes": [
33 {
34 "handle": [
35 {
36 "handler": "static_response",
37 "status_code": 403
38 }
39 ]
40 }
41 ]
42 }
43 ],
44 "terminal": true
45 }
46 ]
47 },
48 "srv1": {
49 "listen": [
50 ":80"
51 ],
52 "routes": [
53 {
54 "match": [
55 {
56 "host": [
57 "b.b"
58 ]
59 }
60 ],
61 "handle": [
62 {
63 "handler": "subroute",
64 "routes": [
65 {
66 "handle": [
67 {
68 "handler": "static_response",
69 "status_code": 404
70 }
71 ]
72 }
73 ]
74 }
75 ],
76 "terminal": true
77 }
78 ]
79 },
80 "srv2": {
81 "listen": [
82 ":8443"
83 ],
84 "routes": [
85 {
86 "match": [
87 {
88 "host": [
89 "b.b"
90 ]
91 }
92 ],
93 "handle": [
94 {
95 "handler": "subroute",
96 "routes": [
97 {
98 "handle": [
99 {
100 "handler": "static_response",
101 "status_code": 404
102 }
103 ]
104 }
105 ]
106 }
107 ],
108 "terminal": true
109 }
110 ]
111 }
112 }
113 },
114 "tls": {
115 "automation": {
116 "policies": [
117 {
118 "subjects": [
119 "a.a",
120 "b.b"
121 ],
122 "issuers": [
123 {
124 "module": "internal"
125 }
126 ]
127 }
128 ]
129 }
130 }
131 }
132 }