mirror of
https://github.com/hacdias/webdav.git
synced 2026-09-22 03:20:41 +08:00
docs: add Caddy configuration example
This commit is contained in:
@@ -191,7 +191,9 @@ The `allowed_*` properties are optional, the default value for each of them will
|
|||||||
|
|
||||||
### Reverse Proxy Service
|
### Reverse Proxy Service
|
||||||
|
|
||||||
When using a reverse proxy implementation, like Caddy, Nginx, or Apache, note that you need to forward the correct headers in order to avoid 502 errors. Here's a Nginx configuration example:
|
When using a reverse proxy implementation, like Caddy, Nginx, or Apache, note that you need to forward the correct headers in order to avoid 502 errors.
|
||||||
|
|
||||||
|
#### Nginx Configuration Example
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
location / {
|
location / {
|
||||||
@@ -212,6 +214,24 @@ location / {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Caddy Configuration Example
|
||||||
|
|
||||||
|
```Caddyfile
|
||||||
|
example.com {
|
||||||
|
tls internal # for local development
|
||||||
|
# tls [email protected] # so that Caddy gets certs for you via Letsencrypt
|
||||||
|
|
||||||
|
# Rewrites destination to remove host and include only the path e.g. /test.txt
|
||||||
|
@hasDest header_regexp dest ^https?://[^/]+(.*)$
|
||||||
|
header @hasDest Destination {re.dest.1}
|
||||||
|
|
||||||
|
reverse_proxy 127.0.0.1:6065 { # if running on the same network in docker you can just point to the service name e.g. webdav:6065
|
||||||
|
header_up X-Real-IP {remote_host}
|
||||||
|
header_up REMOTE-HOST {remote_host}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Systemd
|
### Systemd
|
||||||
|
|||||||
Reference in New Issue
Block a user