From 235f0dade066bdf4a8253d56a9563a8561e8f6d6 Mon Sep 17 00:00:00 2001 From: Justin Hawkins Date: Fri, 21 Jul 2023 11:42:11 +0930 Subject: [PATCH] Update documentation to support Caddy V2 (#1657) * Update index.md Change Caddy example config to the current V2 config. * Simplify config * Include legacy config as well --- site/src/docs/manuals/subdomain/index.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/site/src/docs/manuals/subdomain/index.md b/site/src/docs/manuals/subdomain/index.md index f47603d2..24892ab0 100644 --- a/site/src/docs/manuals/subdomain/index.md +++ b/site/src/docs/manuals/subdomain/index.md @@ -58,7 +58,27 @@ The `nginx.conf` would then look something like: ### Caddy configuration -Example of Caddy configuration (`Caddyfile`) running remark42 service on `example.com/remark42/`: +Example of Caddy 2 configuration (`Caddyfile`) running remark42 service on `example.com/remark42/`, proxying +requests under the path /remark42 through to the docker container: + +``` +example.com { + root * /srv/www + + log { + output file /logs/example.com.access.log + } + + # remark42 + handle_path /remark42* { + reverse_proxy remark42:8080 + } + + file_server +} +``` + +If you are using a legacy version (v1) of Caddy, the following configuration would be appropriate: ``` example.com { @@ -66,7 +86,7 @@ example.com { tls mail@example.com root /srv/www - log /logs/access.log + log /logs/example.com.access.log # remark42 proxy /remark42/ http://remark42:8080/ {