@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 144 lines 2.17 KB
Raw
1 {
2 email my.email@example.com
3 }
4
5 :82 {
6 redir https://example.com{uri}
7 }
8
9 :83 {
10 redir https://example.com{uri}
11 }
12
13 :84 {
14 redir https://example.com{uri}
15 }
16
17 abc.de {
18 redir https://example.com{uri}
19 }
20 ----------
21 {
22 "apps": {
23 "http": {
24 "servers": {
25 "srv0": {
26 "listen": [
27 ":443"
28 ],
29 "routes": [
30 {
31 "match": [
32 {
33 "host": [
34 "abc.de"
35 ]
36 }
37 ],
38 "handle": [
39 {
40 "handler": "subroute",
41 "routes": [
42 {
43 "handle": [
44 {
45 "handler": "static_response",
46 "headers": {
47 "Location": [
48 "https://example.com{http.request.uri}"
49 ]
50 },
51 "status_code": 302
52 }
53 ]
54 }
55 ]
56 }
57 ],
58 "terminal": true
59 }
60 ]
61 },
62 "srv1": {
63 "listen": [
64 ":82"
65 ],
66 "routes": [
67 {
68 "handle": [
69 {
70 "handler": "static_response",
71 "headers": {
72 "Location": [
73 "https://example.com{http.request.uri}"
74 ]
75 },
76 "status_code": 302
77 }
78 ]
79 }
80 ]
81 },
82 "srv2": {
83 "listen": [
84 ":83"
85 ],
86 "routes": [
87 {
88 "handle": [
89 {
90 "handler": "static_response",
91 "headers": {
92 "Location": [
93 "https://example.com{http.request.uri}"
94 ]
95 },
96 "status_code": 302
97 }
98 ]
99 }
100 ]
101 },
102 "srv3": {
103 "listen": [
104 ":84"
105 ],
106 "routes": [
107 {
108 "handle": [
109 {
110 "handler": "static_response",
111 "headers": {
112 "Location": [
113 "https://example.com{http.request.uri}"
114 ]
115 },
116 "status_code": 302
117 }
118 ]
119 }
120 ]
121 }
122 }
123 },
124 "tls": {
125 "automation": {
126 "policies": [
127 {
128 "issuers": [
129 {
130 "email": "my.email@example.com",
131 "module": "acme"
132 },
133 {
134 "ca": "https://acme.zerossl.com/v2/DV90",
135 "email": "my.email@example.com",
136 "module": "acme"
137 }
138 ]
139 }
140 ]
141 }
142 }
143 }
144 }