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 | localhost |
| 2 | |
| 3 | respond "hello from localhost" |
| 4 | tls { |
| 5 | issuer acme { |
| 6 | dns_ttl 5m10s |
| 7 | } |
| 8 | issuer zerossl api_key { |
| 9 | dns_ttl 10m20s |
| 10 | } |
| 11 | } |
| 12 | ---------- |
| 13 | { |
| 14 | "apps": { |
| 15 | "http": { |
| 16 | "servers": { |
| 17 | "srv0": { |
| 18 | "listen": [ |
| 19 | ":443" |
| 20 | ], |
| 21 | "routes": [ |
| 22 | { |
| 23 | "match": [ |
| 24 | { |
| 25 | "host": [ |
| 26 | "localhost" |
| 27 | ] |
| 28 | } |
| 29 | ], |
| 30 | "handle": [ |
| 31 | { |
| 32 | "handler": "subroute", |
| 33 | "routes": [ |
| 34 | { |
| 35 | "handle": [ |
| 36 | { |
| 37 | "body": "hello from localhost", |
| 38 | "handler": "static_response" |
| 39 | } |
| 40 | ] |
| 41 | } |
| 42 | ] |
| 43 | } |
| 44 | ], |
| 45 | "terminal": true |
| 46 | } |
| 47 | ] |
| 48 | } |
| 49 | } |
| 50 | }, |
| 51 | "tls": { |
| 52 | "automation": { |
| 53 | "policies": [ |
| 54 | { |
| 55 | "subjects": [ |
| 56 | "localhost" |
| 57 | ], |
| 58 | "issuers": [ |
| 59 | { |
| 60 | "challenges": { |
| 61 | "dns": { |
| 62 | "ttl": 310000000000 |
| 63 | } |
| 64 | }, |
| 65 | "module": "acme" |
| 66 | }, |
| 67 | { |
| 68 | "api_key": "api_key", |
| 69 | "cname_validation": { |
| 70 | "ttl": 620000000000 |
| 71 | }, |
| 72 | "module": "zerossl" |
| 73 | } |
| 74 | ] |
| 75 | } |
| 76 | ] |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | } |