[docs] added split-domain configuration for Caddy 2 (#2288)

* Update host-account-domain.md

Added split-domain configuration for Caddy 2
This commit is contained in:
wuchyi 2023-10-30 15:23:01 +08:00 committed by GitHub
parent 0b978f2c56
commit 9d11c716cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,3 +102,17 @@ myservice:
- 'traefik.http.middlewares.myservice-gts.redirectregex.replacement=https://social.$${1}/.well-known/$${2}'
- 'traefik.http.routers.myservice.middlewares=myservice-gts@docker'
```
### Caddy 2
Ensure that the redirect is configured on the account domain in your `Caddyfile`. The following example assumes the account domain as `example.com`, and host domain as `social.example.com`.
```
example.com {
redir /.well-known/host-meta* https://social.example.com{uri} permanent
redir /.well-known/webfinger* https://social.example.com{uri} permanent
redir /.well-known/nodeinfo* https://social.example.com{uri} permanent
}
```