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
This commit is contained in:
Justin Hawkins
2023-07-20 21:12:11 -05:00
committed by GitHub
parent 9c718cbc5f
commit 235f0dade0
+22 -2
View File
@@ -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/ {