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