mirror of
https://github.com/caddyserver/website.git
synced 2025-04-25 14:36:16 -04:00
docs: status
option for file_server
, health_uri
for reverse_proxy
(#156)
This commit is contained in:
parent
452537adea
commit
c1383e7981
2 changed files with 9 additions and 7 deletions
|
@ -12,11 +12,12 @@ Most often, the `file_server` directive is paired with the [`root`](/docs/caddyf
|
|||
|
||||
```caddy-d
|
||||
file_server [<matcher>] [browse] {
|
||||
root <path>
|
||||
hide <files...>
|
||||
index <filenames...>
|
||||
browse [<template_file>]
|
||||
root <path>
|
||||
hide <files...>
|
||||
index <filenames...>
|
||||
browse [<template_file>]
|
||||
precompressed <formats...>
|
||||
status <status>
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -27,6 +28,7 @@ file_server [<matcher>] [browse] {
|
|||
- **<template_file>** is an optional custom template file to use for directory listings. Defaults to the template that can be found [here in the source code ](https://github.com/caddyserver/caddy/blob/master/modules/caddyhttp/fileserver/browsetpl.go).
|
||||
- **precompressed** is the list of encoding formats to search for precompressed sidecar files.
|
||||
- **<formats...>** is the ordered list of encoding formats to search for precompressed sidecar files. Supported formats are `gzip`, `zstd` and `br`.
|
||||
- **status** is an optional status code override to be used when writing the response. Particularly useful when responding to a request with a custom error page. Can be a 3-digit status code, For example: `404`. Placeholders are supported. By default, the written status code will typically be `200`, or `206` for partial content.
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue