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 | # example from issue #4667 |
| 2 | { |
| 3 | auto_https off |
| 4 | } |
| 5 | |
| 6 | https://, example.com { |
| 7 | tls test.crt test.key |
| 8 | respond "Hello World" |
| 9 | } |
| 10 | ---------- |
| 11 | { |
| 12 | "apps": { |
| 13 | "http": { |
| 14 | "servers": { |
| 15 | "srv0": { |
| 16 | "listen": [ |
| 17 | ":443" |
| 18 | ], |
| 19 | "routes": [ |
| 20 | { |
| 21 | "handle": [ |
| 22 | { |
| 23 | "body": "Hello World", |
| 24 | "handler": "static_response" |
| 25 | } |
| 26 | ] |
| 27 | } |
| 28 | ], |
| 29 | "tls_connection_policies": [ |
| 30 | { |
| 31 | "certificate_selection": { |
| 32 | "any_tag": [ |
| 33 | "cert0" |
| 34 | ] |
| 35 | } |
| 36 | } |
| 37 | ], |
| 38 | "automatic_https": { |
| 39 | "disable": true |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | }, |
| 44 | "tls": { |
| 45 | "certificates": { |
| 46 | "load_files": [ |
| 47 | { |
| 48 | "certificate": "test.crt", |
| 49 | "key": "test.key", |
| 50 | "tags": [ |
| 51 | "cert0" |
| 52 | ] |
| 53 | } |
| 54 | ] |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | } |