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 | { |
| 2 | pki { |
| 3 | ca custom-ca { |
| 4 | name "Custom CA" |
| 5 | } |
| 6 | } |
| 7 | } |
| 8 | |
| 9 | acme.example.com { |
| 10 | acme_server { |
| 11 | ca custom-ca |
| 12 | allow { |
| 13 | domains host-1.internal.example.com host-2.internal.example.com |
| 14 | } |
| 15 | } |
| 16 | } |
| 17 | ---------- |
| 18 | { |
| 19 | "apps": { |
| 20 | "http": { |
| 21 | "servers": { |
| 22 | "srv0": { |
| 23 | "listen": [ |
| 24 | ":443" |
| 25 | ], |
| 26 | "routes": [ |
| 27 | { |
| 28 | "match": [ |
| 29 | { |
| 30 | "host": [ |
| 31 | "acme.example.com" |
| 32 | ] |
| 33 | } |
| 34 | ], |
| 35 | "handle": [ |
| 36 | { |
| 37 | "handler": "subroute", |
| 38 | "routes": [ |
| 39 | { |
| 40 | "handle": [ |
| 41 | { |
| 42 | "ca": "custom-ca", |
| 43 | "handler": "acme_server", |
| 44 | "policy": { |
| 45 | "allow": { |
| 46 | "domains": [ |
| 47 | "host-1.internal.example.com", |
| 48 | "host-2.internal.example.com" |
| 49 | ] |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | ] |
| 56 | } |
| 57 | ], |
| 58 | "terminal": true |
| 59 | } |
| 60 | ] |
| 61 | } |
| 62 | } |
| 63 | }, |
| 64 | "pki": { |
| 65 | "certificate_authorities": { |
| 66 | "custom-ca": { |
| 67 | "name": "Custom CA" |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | } |