docs: file_server: Clarify scope of root subdirective

This commit is contained in:
Matthew Holt 2020-02-28 15:15:27 -07:00
parent dd3a8ba9cf
commit a0d5e5097c
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -19,7 +19,7 @@ file_server [<matcher>] [browse] {
``` ```
- **browse** enables file listings for requests to directories that do not have an index file. - **browse** enables file listings for requests to directories that do not have an index file.
- **root** sets the path to the site root for just this file server instance, overriding any other. Default: `{http.vars.root}` or the current working directory. - **root** sets the path to the site root for just this file server instance, overriding any other. Default: `{http.vars.root}` or the current working directory. Note: When specified as a subdirective like this, only this directive will know this root; for other directives (like [try_files](/docs/caddyfile/directives/try_files) or [templates](/docs/caddyfile/directives/templates)) to know the same site root, use the [root](/docs/caddyfile/directives/root) directive, not subdirective.
- **hide** is a list of files to hide; if requested, the file server will pretend they do not exist. The active configuration file will be added by default. - **hide** is a list of files to hide; if requested, the file server will pretend they do not exist. The active configuration file will be added by default.
- **<template_file>** is an optional custom template file to use for directory listings. - **<template_file>** is an optional custom template file to use for directory listings.