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
| 1 | :8884 { |
| 2 | # Port range |
| 3 | reverse_proxy localhost:8001-8002 |
| 4 | |
| 5 | # Port range with placeholder |
| 6 | reverse_proxy {host}:8001-8002 |
| 7 | |
| 8 | # Port range with scheme |
| 9 | reverse_proxy https://localhost:8001-8002 |
| 10 | } |
| 11 | ---------- |
| 12 | { |
| 13 | "apps": { |
| 14 | "http": { |
| 15 | "servers": { |
| 16 | "srv0": { |
| 17 | "listen": [ |
| 18 | ":8884" |
| 19 | ], |
| 20 | "routes": [ |
| 21 | { |
| 22 | "handle": [ |
| 23 | { |
| 24 | "handler": "reverse_proxy", |
| 25 | "upstreams": [ |
| 26 | { |
| 27 | "dial": "localhost:8001" |
| 28 | }, |
| 29 | { |
| 30 | "dial": "localhost:8002" |
| 31 | } |
| 32 | ] |
| 33 | }, |
| 34 | { |
| 35 | "handler": "reverse_proxy", |
| 36 | "upstreams": [ |
| 37 | { |
| 38 | "dial": "{http.request.host}:8001" |
| 39 | }, |
| 40 | { |
| 41 | "dial": "{http.request.host}:8002" |
| 42 | } |
| 43 | ] |
| 44 | }, |
| 45 | { |
| 46 | "handler": "reverse_proxy", |
| 47 | "transport": { |
| 48 | "protocol": "http", |
| 49 | "tls": {} |
| 50 | }, |
| 51 | "upstreams": [ |
| 52 | { |
| 53 | "dial": "localhost:8001" |
| 54 | }, |
| 55 | { |
| 56 | "dial": "localhost:8002" |
| 57 | } |
| 58 | ] |
| 59 | } |
| 60 | ] |
| 61 | } |
| 62 | ] |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | } |