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 | |
| 3 | reverse_proxy 127.0.0.1:65535 { |
| 4 | lb_retries 3 |
| 5 | lb_retry_match expression `{rp.status_code} in [502, 503]` |
| 6 | lb_retry_match expression `{rp.is_transport_error} || {rp.status_code} == 502` |
| 7 | lb_retry_match expression `method('POST') && {rp.status_code} == 503` |
| 8 | lb_retry_match `{rp.status_code} == 504` |
| 9 | lb_retry_match `{rp.is_transport_error} && method('PUT')` |
| 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 | "load_balancing": { |
| 26 | "retries": 3, |
| 27 | "retry_match": [ |
| 28 | { |
| 29 | "expression": "{http.reverse_proxy.status_code} in [502, 503]" |
| 30 | }, |
| 31 | { |
| 32 | "expression": "{http.reverse_proxy.is_transport_error} || {http.reverse_proxy.status_code} == 502" |
| 33 | }, |
| 34 | { |
| 35 | "expression": "method('POST') \u0026\u0026 {http.reverse_proxy.status_code} == 503" |
| 36 | }, |
| 37 | { |
| 38 | "expression": "{http.reverse_proxy.status_code} == 504" |
| 39 | }, |
| 40 | { |
| 41 | "expression": "{http.reverse_proxy.is_transport_error} \u0026\u0026 method('PUT')" |
| 42 | } |
| 43 | ] |
| 44 | }, |
| 45 | "upstreams": [ |
| 46 | { |
| 47 | "dial": "127.0.0.1:65535" |
| 48 | } |
| 49 | ] |
| 50 | } |
| 51 | ] |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | } |