From 154b28603a069ab4ad42ad535718a83384d6b157 Mon Sep 17 00:00:00 2001
From: Justin Hawkins <justin@hawkins.id.au>
Date: Tue, 18 Jul 2023 22:23:00 +0930
Subject: [PATCH 1/3] Update index.md

Change Caddy example config to the current V2 config.
---
 site/src/docs/manuals/subdomain/index.md | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/site/src/docs/manuals/subdomain/index.md b/site/src/docs/manuals/subdomain/index.md
index f47603d21c..a1112156e6 100644
--- a/site/src/docs/manuals/subdomain/index.md
+++ b/site/src/docs/manuals/subdomain/index.md
@@ -61,17 +61,14 @@ The `nginx.conf` would then look something like:
 Example of Caddy configuration (`Caddyfile`) running remark42 service on `example.com/remark42/`:
 
 ```
-example.com {
-	gzip
-	tls mail@example.com
-
-	root /srv/www
-	log  /logs/access.log
-
-	# remark42
-	proxy /remark42/ http://remark42:8080/ {
-		without /remark42
-		transparent
-	}
+https://example.com {
+        log {
+                output file /var/log/caddy/example.com.access.log
+        }
+        root * /home/example/web
+        handle_path /remark42* {
+                reverse_proxy  localhost:8080
+        }
+        file_server
 }
 ```

From ed1160070d6158322b630ca74ea18d6e6819b9dd Mon Sep 17 00:00:00 2001
From: Justin Hawkins <justin@hawkins.id.au>
Date: Tue, 18 Jul 2023 22:35:07 +0930
Subject: [PATCH 2/3] Simplify config

---
 site/src/docs/manuals/subdomain/index.md | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/site/src/docs/manuals/subdomain/index.md b/site/src/docs/manuals/subdomain/index.md
index a1112156e6..dbcc655ecd 100644
--- a/site/src/docs/manuals/subdomain/index.md
+++ b/site/src/docs/manuals/subdomain/index.md
@@ -58,17 +58,15 @@ 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 configuration (`Caddyfile`) running remark42 service on `example.com/remark42/`, proxying
+requests under the path /remark42 through to the docker container:
 
 ```
-https://example.com {
-        log {
-                output file /var/log/caddy/example.com.access.log
-        }
-        root * /home/example/web
-        handle_path /remark42* {
-                reverse_proxy  localhost:8080
-        }
-        file_server
+example.com {
+  ... other Caddy config for example.com ...
+
+  handle_path /remark42* {
+    reverse_proxy remark42:8080
+  }
 }
 ```

From f59b1a5d373b4c04117a0531101197fb9cfcb638 Mon Sep 17 00:00:00 2001
From: Justin Hawkins <justin@hawkins.id.au>
Date: Wed, 19 Jul 2023 10:02:45 +0930
Subject: [PATCH 3/3] Include legacy config as well

---
 site/src/docs/manuals/subdomain/index.md | 29 ++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/site/src/docs/manuals/subdomain/index.md b/site/src/docs/manuals/subdomain/index.md
index dbcc655ecd..24892ab0ef 100644
--- a/site/src/docs/manuals/subdomain/index.md
+++ b/site/src/docs/manuals/subdomain/index.md
@@ -58,15 +58,40 @@ The `nginx.conf` would then look something like:
 
 ### Caddy configuration
 
-Example of Caddy configuration (`Caddyfile`) running remark42 service on `example.com/remark42/`, proxying
+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 {
-  ... other Caddy config for 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 {
+	gzip
+	tls mail@example.com
+
+	root /srv/www
+	log  /logs/example.com.access.log
+
+	# remark42
+	proxy /remark42/ http://remark42:8080/ {
+		without /remark42
+		transparent
+	}
 }
 ```