@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 112 lines 1.74 KB
Raw
1 http://localhost:2020 {
2 log
3 log_skip /first-hidden*
4 log_skip /second-hidden*
5 respond 200
6 }
7
8 :2020 {
9 respond 418
10 }
11 ----------
12 {
13 "apps": {
14 "http": {
15 "servers": {
16 "srv0": {
17 "listen": [
18 ":2020"
19 ],
20 "routes": [
21 {
22 "match": [
23 {
24 "host": [
25 "localhost"
26 ]
27 }
28 ],
29 "handle": [
30 {
31 "handler": "subroute",
32 "routes": [
33 {
34 "handle": [
35 {
36 "handler": "vars",
37 "log_skip": true
38 }
39 ],
40 "match": [
41 {
42 "path": [
43 "/second-hidden*"
44 ]
45 }
46 ]
47 },
48 {
49 "handle": [
50 {
51 "handler": "vars",
52 "log_skip": true
53 }
54 ],
55 "match": [
56 {
57 "path": [
58 "/first-hidden*"
59 ]
60 }
61 ]
62 },
63 {
64 "handle": [
65 {
66 "handler": "static_response",
67 "status_code": 200
68 }
69 ]
70 }
71 ]
72 }
73 ],
74 "terminal": true
75 },
76 {
77 "handle": [
78 {
79 "handler": "subroute",
80 "routes": [
81 {
82 "handle": [
83 {
84 "handler": "static_response",
85 "status_code": 418
86 }
87 ]
88 }
89 ]
90 }
91 ],
92 "terminal": true
93 }
94 ],
95 "automatic_https": {
96 "skip": [
97 "localhost"
98 ]
99 },
100 "logs": {
101 "logger_names": {
102 "localhost": [
103 ""
104 ]
105 },
106 "skip_unmapped_hosts": true
107 }
108 }
109 }
110 }
111 }
112 }