瀏覽代碼

clarifying reverse proxying of well-known files

pull/1806/head
Arkonos 3 年之前
父節點
當前提交
6abdb6e6f0
共有 2 個文件被更改,包括 33 次插入2 次删除
  1. +16
    -2
      docs/configuring-well-known.md
  2. +17
    -0
      examples/caddy2/Caddyfile

+ 16
- 2
docs/configuring-well-known.md 查看文件

@@ -116,8 +116,22 @@ server {
**For Caddy 2**, it would be something like this:

```caddy
reverse_proxy /.well-known/matrix/* https://matrix.DOMAIN {
header_up Host {http.reverse_proxy.upstream.hostport}
DOMAIN.com {
@wellknown {
path /.well-known/matrix/*:x
}

handle @wellknown {
reverse_proxy https://matrix.DOMAIN.com {
header_up Host {http.reverse_proxy.upstream.hostport}
}
}
# Configration for the base domain goes here
# handle {
# header -Server
# encode zstd gzip
# reverse_proxy localhost:4020
# }
}
```



+ 17
- 0
examples/caddy2/Caddyfile 查看文件

@@ -214,3 +214,20 @@ element.DOMAIN.tld {
# }
# }
#}
DOMAIN.com {
@wellknown {
path /.well-known/matrix/*
}

handle @wellknown {
reverse_proxy https://matrix.DOMAIN.com {
header_up Host {http.reverse_proxy.upstream.hostport}
}
}
# Configration for the base domain goes here
# handle {
# header -Server
# encode zstd gzip
# reverse_proxy localhost:4020
# }
}

Loading…
取消
儲存