mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-09 03:04:57 -04:00
file-server and reverse-proxy commands disable admin endpoint
parent
4277dc62a2
commit
d9ba43f577
@ -127,7 +127,9 @@ $ caddy start
|
|||||||
[--adapter <name>]
|
[--adapter <name>]
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
## 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.
|
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.
|
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.
|
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
|
## 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.
|
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
|
### Example
|
||||||
|
|
||||||
To proxy a local port to a remote site:
|
To proxy a local port to a remote site:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user