Reindent with spaces and less indentation for clarity, add "root" to show how to set site root

mathew 2019-07-03 12:56:13 -05:00
parent b6db30c1a4
commit 8f4d2389ae

@ -21,7 +21,7 @@ Empty HTTP server (responds with empty responses):
}
```
Static file server out of the current directory:
Static file server out of the specified directory:
```json
{
@ -33,7 +33,8 @@ Static file server out of the current directory:
"routes": [
{
"respond": {
"responder": "file_server"
"responder": "file_server",
"root": "/var/www"
}
}
]
@ -61,7 +62,8 @@ Same as above, but with automatic HTTPS (including HTTP->HTTPS redirects):
}
],
"respond": {
"responder": "file_server"
"responder": "file_server",
"root": "/var/www"
}
}
]
@ -70,6 +72,7 @@ Same as above, but with automatic HTTPS (including HTTP->HTTPS redirects):
}
}
}
```
The reason the above config uses HTTPS is because the host matcher informs Caddy which hostnames to manage certificates for.