Add global config docs

Matt Holt 2019-08-22 13:44:21 -06:00
parent 14fdbecfac
commit 041c48e430

@ -30,6 +30,7 @@ Features which are available in Caddy Enterprise are indicated with   🏢
- [Caddyfile adapter](#caddyfile-adapter)
- [Matcher tokens](#matcher-tokens)
- [Shorthand placeholders](#shorthand-placeholders)
- [Global config](#global-config)
- [Caddyfile directives](#caddyfile-directives)
- [root](#root)
- [matcher](#matcher)
@ -430,6 +431,20 @@ The Caddyfile is supposed to be easy to write, so it also provides shorter place
| {query} | {http.request.uri.query} |
#### Global config
The Caddyfile has a special place for specific settings that apply to the whole process rather than specifically per-site. This allows us to replace an arbitrary and growing number of CLI flags and environment variables, which constituted a large portion of hidden configuration in version 1.
Simply create a server block with no keys to specify such global options. The following options are allowed:
```
{
http_port <port>
https_port <port>
}
```
#### Caddyfile directives
##### root
@ -565,7 +580,7 @@ tls [off|<cert> <key>] {
Rewrites a request based on the existence of the listed files on disk. Because this is a fairly common rewrite, this directive simply combines a `rewrite` handler with a `file` matcher for convenience in writing.
```
try_files [<files...>]
try_files <files...>
```