diff --git a/src/docs/markdown/caddyfile/directives/reverse_proxy.md b/src/docs/markdown/caddyfile/directives/reverse_proxy.md index 6615139..470bddd 100644 --- a/src/docs/markdown/caddyfile/directives/reverse_proxy.md +++ b/src/docs/markdown/caddyfile/directives/reverse_proxy.md @@ -185,7 +185,7 @@ Set the upstream Host header to the address of the upstream (by default, it will ``` reverse_proxy localhost:9000 { - header_up Host {http.reverse_proxy.upstream.hostport} + header_up Host {http.reverse_proxy.upstream.hostport} } ``` @@ -195,3 +195,11 @@ Reverse proxy to an HTTPS endpoint: reverse_proxy https://example.com ``` +Strip a path prefix then proxy: + +``` +route /prefix/* { + uri strip_prefix /prefix + reverse_proxy localhost:9000 +} +``` \ No newline at end of file diff --git a/src/docs/markdown/caddyfile/directives/tls.md b/src/docs/markdown/caddyfile/directives/tls.md index 9f53945..cdcd11b 100644 --- a/src/docs/markdown/caddyfile/directives/tls.md +++ b/src/docs/markdown/caddyfile/directives/tls.md @@ -22,6 +22,7 @@ tls [internal|] | [ ] { load ca ca_root + dns [] on_demand } ``` @@ -59,6 +60,7 @@ tls [internal|] | [ ] { - **load** specifies a list of folders from which to load PEM files that are certificate+key bundles. - **ca** changes the ACME CA endpoint. This is most often used to use [Let's Encrypt's staging endpoint](https://letsencrypt.org/docs/staging-environment/) or an internal ACME server. (To change this value for the whole Caddyfile, use the `acme_ca` [global option](/docs/caddyfile/options) instead.) - **ca_root** specifies a PEM file that contains a trusted root certificate for the ACME CA endpoint, if not in the system trust store. +- **dns** enables the [DNS challenge](/docs/automatic-https#dns-challenge) using the given provider plugin, which must be from one of the [caddy-dns](https://github.com/caddy-dns) repositories. Each provider plugin may have their own syntax following their name; refer to their docs for details. - **on_demand** enables [on-demand TLS](/docs/automatic-https#on-demand-tls) for the hostnames given in the site block's address(es). @@ -89,4 +91,12 @@ Specify an email address for your ACME account (but if only one email is used fo ``` tls your@email.com +``` + +Enable the DNS challenge for a domain managed on Cloudflare with account credentials in an environment variable: + +``` +tls { + dns cloudflare {env.CLOUDFLARE_API_TOKEN} +} ``` \ No newline at end of file diff --git a/src/docs/markdown/index.md b/src/docs/markdown/index.md index 4177623..180796a 100644 --- a/src/docs/markdown/index.md +++ b/src/docs/markdown/index.md @@ -19,7 +19,7 @@ Caddy is a powerful, extensible platform to serve your sites, services, and apps and operates primarily at L4 (transport layer) and L7 (application layer) of the [OSI model](https://en.wikipedia.org/wiki/OSI_model), though it has the ability to work with other layers. -Configuration is both dynamic and exportable with [Caddy's API](/docs/api); no config files required. The format of the config document takes many forms with [config adapters](/docs/config-adapters), but Caddy's native config language is [JSON](/docs/json/). +Configuration is both dynamic and exportable with [Caddy's API](/docs/api). Although no config files required, you can still use them; most people's favorite way of configuring Caddy is using the [Caddyfile](/docs/caddyfile). The format of the config document takes many forms with [config adapters](/docs/config-adapters), but Caddy's native config language is [JSON](/docs/json/). Caddy compiles for all major platforms and has no dependencies. diff --git a/src/includes/header-nav.html b/src/includes/header-nav.html index cbd0bc2..91141eb 100644 --- a/src/includes/header-nav.html +++ b/src/includes/header-nav.html @@ -1,6 +1,7 @@