mirror of
https://github.com/caddyserver/website.git
synced 2025-04-22 04:56:17 -04:00
docs: General 2.6 updates
This commit is contained in:
parent
a87295bf0b
commit
c429966513
4 changed files with 13 additions and 5 deletions
|
@ -115,6 +115,7 @@ vars
|
|||
root
|
||||
|
||||
header
|
||||
copy_response_headers # only in reverse_proxy's handle_response block
|
||||
request_body
|
||||
|
||||
redir
|
||||
|
@ -141,6 +142,7 @@ route
|
|||
# handlers that typically respond to requests
|
||||
abort
|
||||
error
|
||||
copy_response # only in reverse_proxy's handle_response block
|
||||
respond
|
||||
metrics
|
||||
reverse_proxy
|
||||
|
|
|
@ -533,12 +533,12 @@ path_regexp static \.([a-f0-9]{6})\.(css|js)$
|
|||
### protocol
|
||||
|
||||
```caddy-d
|
||||
protocol http|https|grpc
|
||||
protocol http|https|grpc|http/<version>[+]
|
||||
|
||||
expression protocol('http|https|grpc')
|
||||
```
|
||||
|
||||
By request protocol.
|
||||
By request protocol. A broad protocol name such as `http`, `https`, or `grpc` can be used; or specific or minimum HTTP versions such as `http/1.1` or `http/2+`.
|
||||
|
||||
There can only be one `protocol` matcher per named matcher.
|
||||
|
||||
|
|
|
@ -180,7 +180,8 @@ Prints the environment as seen by caddy, then exits. Can be useful when debuggin
|
|||
[--domain <example.com>]
|
||||
[--browse]
|
||||
[--templates]
|
||||
[--access-log]</code></pre>
|
||||
[--access-log]
|
||||
[--debug]</code></pre>
|
||||
|
||||
Spins up a simple but production-ready static file server.
|
||||
|
||||
|
@ -196,6 +197,8 @@ Spins up a simple but production-ready static file server.
|
|||
|
||||
`--access-log` enables the request/access log.
|
||||
|
||||
`--debug` enables verbose logging.
|
||||
|
||||
This command disables the admin API, making it easier to run multiple instances on a local development machine.
|
||||
|
||||
|
||||
|
@ -373,7 +376,8 @@ Pipe in a maintenance page:
|
|||
[--from <addr>]
|
||||
--to <addr>
|
||||
[--change-host-header]
|
||||
[--internal-certs]</code></pre>
|
||||
[--internal-certs]
|
||||
[--debug]</code></pre>
|
||||
|
||||
Spins up a simple but production-ready HTTP(S) reverse proxy.
|
||||
|
||||
|
@ -385,6 +389,8 @@ Spins up a simple but production-ready HTTP(S) reverse proxy.
|
|||
|
||||
`--internal-certs` will cause Caddy to issue certificates using its internal issuer (effectively self-signed) for the domain specified in the `--from` address.
|
||||
|
||||
`--debug` enables verbose logging.
|
||||
|
||||
Both `--from` and `--to` parameters can be URLs, as scheme and domain name will be inferred from the provided URL (paths and query strings ignored). Or they can be a simple network address and not a complete URL.
|
||||
|
||||
This command disables the admin API so it is easier to run multiple instances on a local development machine.
|
||||
|
|
|
@ -184,7 +184,7 @@ To emit logs, get a logger in your module's Provision method:
|
|||
|
||||
```go
|
||||
func (g *Gizmo) Provision(ctx caddy.Context) error {
|
||||
g.logger = ctx.Logger(g) // g.logger is a *zap.Logger
|
||||
g.logger = ctx.Logger() // g.logger is a *zap.Logger
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue