From d9ba43f577f3c2167e2aba02bcd48397988259ae Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Fri, 15 Nov 2019 15:52:42 -0700 Subject: [PATCH] file-server and reverse-proxy commands disable admin endpoint --- v2:-Documentation.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/v2:-Documentation.md b/v2:-Documentation.md index c044f69..8ed3254 100644 --- a/v2:-Documentation.md +++ b/v2:-Documentation.md @@ -127,7 +127,9 @@ $ caddy start [--adapter ] ``` -Starts the Caddy process, optionally bootstrapped with an initial config file. Blocks until server is successfully running (or fails to run), then returns. On Windows, the child process will remain attached to the terminal, so closing the window will forcefully stop Caddy. See [`run`](#run) for more details. +Starts the Caddy process, optionally bootstrapped with an initial config file. Blocks until server is successfully running (or fails to run), then returns. On Windows, the child process will remain attached to the terminal, so closing the window will forcefully stop Caddy. See [`caddy run`](#run) for more details. + +Once started, you can use [`caddy stop`](#stop) to exit the background process. ## run @@ -140,7 +142,7 @@ $ caddy run Same as `start`, but blocks indefinitely; i.e. runs Caddy in "daemon" mode. On Windows, this is recommended over `caddy start` when running Caddy manually since it will be more obvious that Caddy is still running and bound to the terminal window. -If a config file is specified, it will be applied immediately after the process is running. If the config file is not in Caddy's native JSON format, you can specify an adapter with `--adapter` to adapt the given config file to Caddy's native format. The config adapter must be a registered module. Any warnings will be printed to the log, but beware that any adaptation without errors will immediately be used. If you want to review the results of the adaptation first, use the [`adapt`](#adapt) subcommand. +If a config file is specified, it will be applied immediately after the process is running. If the config file is not in Caddy's native JSON format, you can specify an adapter with `--adapter` to adapt the given config file to Caddy's native format. The config adapter must be a registered module. Any warnings will be printed to the log, but beware that any adaptation without errors will immediately be used. If you want to review the results of the adaptation first, use the [`caddy adapt`](#adapt) subcommand. As a special case, if the current working directory has a file called "Caddyfile" and the `caddyfile` config adapter is plugged in (default), then that file will be loaded and used to configure Caddy, even without any command line flags. @@ -260,6 +262,8 @@ $ caddy file-server Spins up a quick but production-ready static file server. By default, the current directory will be the root of the site, but you can use `--path` to override that. `--listen` accepts a listener address; the default is `:2015`. If `--domain` is specified, then the files will only be served from that domain name, and Caddy will attempt to serve it over HTTPS if it qualifies for a certificate, so make sure your DNS is configured properly. If `--browse` is used, requests to directories without an index file will show a file listing. +This command disables the admin API, making it easier to run multiple instances on a local development machine. + ## reverse-proxy @@ -271,6 +275,8 @@ $ caddy reverse-proxy Spins up a quick but production-ready reverse proxy from `--from` address to the `--to` address. The addresses can be `host:port` format or a URL. +This command disables the admin API, making it easier to run multiple instances on a local development machine. + ### Example To proxy a local port to a remote site: