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 | # The *.example.com policy has more subjects, so it is sorted before the |
| 2 | # foo.example.com policy and covers foo.example.com. The first and last |
| 3 | # policies have the same settings, but they must not be merged: that would |
| 4 | # move foo.example.com before the wildcard and change its issuer. |
| 5 | # force_automate makes foo.example.com get its own certificate. |
| 6 | a.example.com, b.example.com, c.example.com { |
| 7 | tls { |
| 8 | issuer acme |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | *.example.com, other.com, third.com { |
| 13 | tls internal |
| 14 | } |
| 15 | |
| 16 | foo.example.com, e.com { |
| 17 | tls force_automate { |
| 18 | issuer acme |
| 19 | } |
| 20 | } |
| 21 | ---------- |
| 22 | { |
| 23 | "apps": { |
| 24 | "http": { |
| 25 | "servers": { |
| 26 | "srv0": { |
| 27 | "listen": [ |
| 28 | ":443" |
| 29 | ], |
| 30 | "routes": [ |
| 31 | { |
| 32 | "match": [ |
| 33 | { |
| 34 | "host": [ |
| 35 | "foo.example.com", |
| 36 | "e.com" |
| 37 | ] |
| 38 | } |
| 39 | ], |
| 40 | "terminal": true |
| 41 | }, |
| 42 | { |
| 43 | "match": [ |
| 44 | { |
| 45 | "host": [ |
| 46 | "a.example.com", |
| 47 | "b.example.com", |
| 48 | "c.example.com" |
| 49 | ] |
| 50 | } |
| 51 | ], |
| 52 | "terminal": true |
| 53 | }, |
| 54 | { |
| 55 | "match": [ |
| 56 | { |
| 57 | "host": [ |
| 58 | "*.example.com", |
| 59 | "other.com", |
| 60 | "third.com" |
| 61 | ] |
| 62 | } |
| 63 | ], |
| 64 | "terminal": true |
| 65 | } |
| 66 | ], |
| 67 | "tls_connection_policies": [ |
| 68 | { |
| 69 | "match": { |
| 70 | "sni": [ |
| 71 | "e.com", |
| 72 | "foo.example.com" |
| 73 | ] |
| 74 | } |
| 75 | }, |
| 76 | {} |
| 77 | ] |
| 78 | } |
| 79 | } |
| 80 | }, |
| 81 | "tls": { |
| 82 | "certificates": { |
| 83 | "automate": [ |
| 84 | "e.com", |
| 85 | "foo.example.com" |
| 86 | ] |
| 87 | }, |
| 88 | "automation": { |
| 89 | "policies": [ |
| 90 | { |
| 91 | "subjects": [ |
| 92 | "a.example.com", |
| 93 | "b.example.com", |
| 94 | "c.example.com" |
| 95 | ], |
| 96 | "issuers": [ |
| 97 | { |
| 98 | "module": "acme" |
| 99 | } |
| 100 | ] |
| 101 | }, |
| 102 | { |
| 103 | "subjects": [ |
| 104 | "*.example.com", |
| 105 | "other.com", |
| 106 | "third.com" |
| 107 | ], |
| 108 | "issuers": [ |
| 109 | { |
| 110 | "module": "internal" |
| 111 | } |
| 112 | ] |
| 113 | }, |
| 114 | { |
| 115 | "subjects": [ |
| 116 | "e.com", |
| 117 | "foo.example.com" |
| 118 | ], |
| 119 | "issuers": [ |
| 120 | { |
| 121 | "module": "acme" |
| 122 | } |
| 123 | ] |
| 124 | } |
| 125 | ] |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | } |