diff --git a/src/docs/markdown/caddyfile/directives/file_server.md b/src/docs/markdown/caddyfile/directives/file_server.md index fc93e96..52fcf64 100644 --- a/src/docs/markdown/caddyfile/directives/file_server.md +++ b/src/docs/markdown/caddyfile/directives/file_server.md @@ -12,11 +12,12 @@ Most often, the `file_server` directive is paired with the [`root`](/docs/caddyf ```caddy-d file_server [] [browse] { - root - hide - index - browse [] + root + hide + index + browse [] precompressed + status } ``` @@ -27,6 +28,7 @@ file_server [] [browse] { - **** is an optional custom template file to use for directory listings. Defaults to the template that can be found [here in the source code ![external link](/resources/images/external-link.svg)](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 diff --git a/src/docs/markdown/caddyfile/directives/reverse_proxy.md b/src/docs/markdown/caddyfile/directives/reverse_proxy.md index a972d3f..b20bb97 100644 --- a/src/docs/markdown/caddyfile/directives/reverse_proxy.md +++ b/src/docs/markdown/caddyfile/directives/reverse_proxy.md @@ -34,7 +34,7 @@ reverse_proxy [] [] { lb_try_interval # active health checking - health_path + health_uri health_port health_interval health_timeout @@ -119,11 +119,11 @@ Load balancing is used whenever more than one upstream is defined. Active health checks perform health checking in the background on a timer: -- **health_path** is the URI path for active health checks. +- **health_uri** is the URI path (and optional query) for active health checks. - **health_port** is the port to use for active health checks, if different from the upstream's port. - **health_interval** is a [duration value](/docs/conventions#durations) that defines how often to perform active health checks. - **health_timeout** is a [duration value](/docs/conventions#durations) that defines how long to wait for a reply before marking the backend as down. -- **health_status** is the HTTP status code to expect from a healthy backend. Can be a 3-digit status code or a status code class ending in `xx`, for example: `200` (default) or `2xx`. +- **health_status** is the HTTP status code to expect from a healthy backend. Can be a 3-digit status code, or a status code class ending in `xx`. For example: `200` (which is the default), or `2xx`. - **health_body** is a substring or regular expression to match on the response body of an active health check. If the backend does not return a matching body, it will be marked as down. - **health_headers** allows specifying headers to set on the active health check requests. This is useful if you need to change the `Host` header, or if you need to provide some authentication to your backend as part of your health checks.