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 | log access-console { |
| 3 | include http.log.access.foo |
| 4 | output file access-localhost.log |
| 5 | format console |
| 6 | } |
| 7 | |
| 8 | log access-json { |
| 9 | include http.log.access.foo |
| 10 | output file access-localhost.json |
| 11 | format json |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | http://localhost:8881 { |
| 16 | log foo |
| 17 | } |
| 18 | ---------- |
| 19 | { |
| 20 | "logging": { |
| 21 | "logs": { |
| 22 | "access-console": { |
| 23 | "writer": { |
| 24 | "filename": "access-localhost.log", |
| 25 | "output": "file" |
| 26 | }, |
| 27 | "encoder": { |
| 28 | "format": "console" |
| 29 | }, |
| 30 | "include": [ |
| 31 | "http.log.access.foo" |
| 32 | ] |
| 33 | }, |
| 34 | "access-json": { |
| 35 | "writer": { |
| 36 | "filename": "access-localhost.json", |
| 37 | "output": "file" |
| 38 | }, |
| 39 | "encoder": { |
| 40 | "format": "json" |
| 41 | }, |
| 42 | "include": [ |
| 43 | "http.log.access.foo" |
| 44 | ] |
| 45 | }, |
| 46 | "default": { |
| 47 | "exclude": [ |
| 48 | "http.log.access.foo" |
| 49 | ] |
| 50 | } |
| 51 | } |
| 52 | }, |
| 53 | "apps": { |
| 54 | "http": { |
| 55 | "servers": { |
| 56 | "srv0": { |
| 57 | "listen": [ |
| 58 | ":8881" |
| 59 | ], |
| 60 | "routes": [ |
| 61 | { |
| 62 | "match": [ |
| 63 | { |
| 64 | "host": [ |
| 65 | "localhost" |
| 66 | ] |
| 67 | } |
| 68 | ], |
| 69 | "terminal": true |
| 70 | } |
| 71 | ], |
| 72 | "automatic_https": { |
| 73 | "skip": [ |
| 74 | "localhost" |
| 75 | ] |
| 76 | }, |
| 77 | "logs": { |
| 78 | "logger_names": { |
| 79 | "localhost": [ |
| 80 | "foo" |
| 81 | ] |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | } |