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 | auto_https off |
| 3 | tls_automate_names mail.example.com |
| 4 | } |
| 5 | |
| 6 | foo.example.com { |
| 7 | respond "hi" |
| 8 | } |
| 9 | ---------- |
| 10 | { |
| 11 | "apps": { |
| 12 | "http": { |
| 13 | "servers": { |
| 14 | "srv0": { |
| 15 | "listen": [ |
| 16 | ":443" |
| 17 | ], |
| 18 | "routes": [ |
| 19 | { |
| 20 | "match": [ |
| 21 | { |
| 22 | "host": [ |
| 23 | "foo.example.com" |
| 24 | ] |
| 25 | } |
| 26 | ], |
| 27 | "handle": [ |
| 28 | { |
| 29 | "handler": "subroute", |
| 30 | "routes": [ |
| 31 | { |
| 32 | "handle": [ |
| 33 | { |
| 34 | "body": "hi", |
| 35 | "handler": "static_response" |
| 36 | } |
| 37 | ] |
| 38 | } |
| 39 | ] |
| 40 | } |
| 41 | ], |
| 42 | "terminal": true |
| 43 | } |
| 44 | ], |
| 45 | "tls_connection_policies": [ |
| 46 | {} |
| 47 | ], |
| 48 | "automatic_https": { |
| 49 | "disable": true |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | }, |
| 54 | "tls": { |
| 55 | "certificates": { |
| 56 | "automate": [ |
| 57 | "mail.example.com" |
| 58 | ] |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | } |