@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 105 lines 1.54 KB
Raw
1 :80 {
2 handle /api/* {
3 respond "api"
4 }
5
6 handle_path /static/* {
7 respond "static"
8 }
9
10 handle {
11 respond "handle"
12 }
13 }
14 ----------
15 {
16 "apps": {
17 "http": {
18 "servers": {
19 "srv0": {
20 "listen": [
21 ":80"
22 ],
23 "routes": [
24 {
25 "group": "group3",
26 "match": [
27 {
28 "path": [
29 "/static/*"
30 ]
31 }
32 ],
33 "handle": [
34 {
35 "handler": "subroute",
36 "routes": [
37 {
38 "handle": [
39 {
40 "handler": "rewrite",
41 "strip_path_prefix": "/static"
42 }
43 ]
44 },
45 {
46 "handle": [
47 {
48 "body": "static",
49 "handler": "static_response"
50 }
51 ]
52 }
53 ]
54 }
55 ]
56 },
57 {
58 "group": "group3",
59 "match": [
60 {
61 "path": [
62 "/api/*"
63 ]
64 }
65 ],
66 "handle": [
67 {
68 "handler": "subroute",
69 "routes": [
70 {
71 "handle": [
72 {
73 "body": "api",
74 "handler": "static_response"
75 }
76 ]
77 }
78 ]
79 }
80 ]
81 },
82 {
83 "group": "group3",
84 "handle": [
85 {
86 "handler": "subroute",
87 "routes": [
88 {
89 "handle": [
90 {
91 "body": "handle",
92 "handler": "static_response"
93 }
94 ]
95 }
96 ]
97 }
98 ]
99 }
100 ]
101 }
102 }
103 }
104 }
105 }