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 | tls_automate_names localhost 192.168.1.5 real.example.com |
| 3 | tls_automate_names second.example.com |
| 4 | } |
| 5 | |
| 6 | example.org { |
| 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 | "example.org" |
| 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 | } |
| 46 | } |
| 47 | }, |
| 48 | "tls": { |
| 49 | "certificates": { |
| 50 | "automate": [ |
| 51 | "192.168.1.5", |
| 52 | "localhost", |
| 53 | "real.example.com", |
| 54 | "second.example.com" |
| 55 | ] |
| 56 | }, |
| 57 | "automation": { |
| 58 | "policies": [ |
| 59 | { |
| 60 | "subjects": [ |
| 61 | "localhost", |
| 62 | "192.168.1.5" |
| 63 | ], |
| 64 | "issuers": [ |
| 65 | { |
| 66 | "module": "internal" |
| 67 | } |
| 68 | ] |
| 69 | } |
| 70 | ] |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | } |