@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 142 lines 2.06 KB
Raw
1 {
2 auto_https disable_redirects
3 admin off
4 }
5
6 http://localhost {
7 bind fd/{env.CADDY_HTTP_FD} {
8 protocols h1
9 }
10 log
11 respond "Hello, HTTP!"
12 }
13
14 https://localhost {
15 bind fd/{env.CADDY_HTTPS_FD} {
16 protocols h1 h2
17 }
18 bind fdgram/{env.CADDY_HTTP3_FD} {
19 protocols h3
20 }
21 log
22 respond "Hello, HTTPS!"
23 }
24 ----------
25 {
26 "admin": {
27 "disabled": true
28 },
29 "apps": {
30 "http": {
31 "servers": {
32 "srv0": {
33 "listen": [
34 "fd/{env.CADDY_HTTPS_FD}",
35 "fdgram/{env.CADDY_HTTP3_FD}"
36 ],
37 "routes": [
38 {
39 "match": [
40 {
41 "host": [
42 "localhost"
43 ]
44 }
45 ],
46 "handle": [
47 {
48 "handler": "subroute",
49 "routes": [
50 {
51 "handle": [
52 {
53 "body": "Hello, HTTPS!",
54 "handler": "static_response"
55 }
56 ]
57 }
58 ]
59 }
60 ],
61 "terminal": true
62 }
63 ],
64 "automatic_https": {
65 "disable_redirects": true
66 },
67 "logs": {
68 "logger_names": {
69 "localhost": [
70 ""
71 ]
72 }
73 },
74 "listen_protocols": [
75 [
76 "h1",
77 "h2"
78 ],
79 [
80 "h3"
81 ]
82 ]
83 },
84 "srv1": {
85 "automatic_https": {
86 "disable_redirects": true
87 }
88 },
89 "srv2": {
90 "listen": [
91 "fd/{env.CADDY_HTTP_FD}"
92 ],
93 "routes": [
94 {
95 "match": [
96 {
97 "host": [
98 "localhost"
99 ]
100 }
101 ],
102 "handle": [
103 {
104 "handler": "subroute",
105 "routes": [
106 {
107 "handle": [
108 {
109 "body": "Hello, HTTP!",
110 "handler": "static_response"
111 }
112 ]
113 }
114 ]
115 }
116 ],
117 "terminal": true
118 }
119 ],
120 "automatic_https": {
121 "disable_redirects": true,
122 "skip": [
123 "localhost"
124 ]
125 },
126 "logs": {
127 "logger_names": {
128 "localhost": [
129 ""
130 ]
131 }
132 },
133 "listen_protocols": [
134 [
135 "h1"
136 ]
137 ]
138 }
139 }
140 }
141 }
142 }