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 | debug |
| 3 | http_port 8080 |
| 4 | https_port 8443 |
| 5 | default_sni localhost |
| 6 | order root first |
| 7 | storage file_system { |
| 8 | root /data |
| 9 | } |
| 10 | acme_ca https://example.com |
| 11 | acme_ca_root /path/to/ca.crt |
| 12 | |
| 13 | email test@example.com |
| 14 | admin { |
| 15 | origins localhost:2019 [::1]:2019 127.0.0.1:2019 192.168.10.128 |
| 16 | } |
| 17 | on_demand_tls { |
| 18 | ask https://example.com |
| 19 | } |
| 20 | local_certs |
| 21 | key_type ed25519 |
| 22 | } |
| 23 | |
| 24 | :80 |
| 25 | ---------- |
| 26 | { |
| 27 | "admin": { |
| 28 | "listen": "localhost:2019", |
| 29 | "origins": [ |
| 30 | "localhost:2019", |
| 31 | "[::1]:2019", |
| 32 | "127.0.0.1:2019", |
| 33 | "192.168.10.128" |
| 34 | ] |
| 35 | }, |
| 36 | "logging": { |
| 37 | "logs": { |
| 38 | "default": { |
| 39 | "level": "DEBUG" |
| 40 | } |
| 41 | } |
| 42 | }, |
| 43 | "storage": { |
| 44 | "module": "file_system", |
| 45 | "root": "/data" |
| 46 | }, |
| 47 | "apps": { |
| 48 | "http": { |
| 49 | "http_port": 8080, |
| 50 | "https_port": 8443, |
| 51 | "servers": { |
| 52 | "srv0": { |
| 53 | "listen": [ |
| 54 | ":80" |
| 55 | ] |
| 56 | } |
| 57 | } |
| 58 | }, |
| 59 | "tls": { |
| 60 | "automation": { |
| 61 | "policies": [ |
| 62 | { |
| 63 | "issuers": [ |
| 64 | { |
| 65 | "module": "internal" |
| 66 | } |
| 67 | ], |
| 68 | "key_type": "ed25519" |
| 69 | } |
| 70 | ], |
| 71 | "on_demand": { |
| 72 | "permission": { |
| 73 | "endpoint": "https://example.com", |
| 74 | "module": "http" |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | } |