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 | # https://caddy.community/t/caddyfile-having-individual-sites-differ-from-global-options/11297 |
| 2 | { |
| 3 | local_certs |
| 4 | } |
| 5 | |
| 6 | a.example.com { |
| 7 | tls internal |
| 8 | } |
| 9 | |
| 10 | b.example.com { |
| 11 | tls abc@example.com |
| 12 | } |
| 13 | |
| 14 | c.example.com { |
| 15 | } |
| 16 | ---------- |
| 17 | { |
| 18 | "apps": { |
| 19 | "http": { |
| 20 | "servers": { |
| 21 | "srv0": { |
| 22 | "listen": [ |
| 23 | ":443" |
| 24 | ], |
| 25 | "routes": [ |
| 26 | { |
| 27 | "match": [ |
| 28 | { |
| 29 | "host": [ |
| 30 | "a.example.com" |
| 31 | ] |
| 32 | } |
| 33 | ], |
| 34 | "terminal": true |
| 35 | }, |
| 36 | { |
| 37 | "match": [ |
| 38 | { |
| 39 | "host": [ |
| 40 | "b.example.com" |
| 41 | ] |
| 42 | } |
| 43 | ], |
| 44 | "terminal": true |
| 45 | }, |
| 46 | { |
| 47 | "match": [ |
| 48 | { |
| 49 | "host": [ |
| 50 | "c.example.com" |
| 51 | ] |
| 52 | } |
| 53 | ], |
| 54 | "terminal": true |
| 55 | } |
| 56 | ] |
| 57 | } |
| 58 | } |
| 59 | }, |
| 60 | "tls": { |
| 61 | "automation": { |
| 62 | "policies": [ |
| 63 | { |
| 64 | "subjects": [ |
| 65 | "b.example.com" |
| 66 | ], |
| 67 | "issuers": [ |
| 68 | { |
| 69 | "email": "abc@example.com", |
| 70 | "module": "acme" |
| 71 | }, |
| 72 | { |
| 73 | "ca": "https://acme.zerossl.com/v2/DV90", |
| 74 | "email": "abc@example.com", |
| 75 | "module": "acme" |
| 76 | } |
| 77 | ] |
| 78 | }, |
| 79 | { |
| 80 | "issuers": [ |
| 81 | { |
| 82 | "module": "internal" |
| 83 | } |
| 84 | ] |
| 85 | } |
| 86 | ] |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | } |