mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 12:36:16 -04:00
docs: Update reverse_proxy examples (#119)
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
parent
e2a6e4e212
commit
a05f559c12
1 changed files with 14 additions and 3 deletions
|
@ -243,11 +243,22 @@ Reverse proxy to an HTTPS endpoint:
|
|||
reverse_proxy https://example.com
|
||||
```
|
||||
|
||||
Strip a path prefix then proxy:
|
||||
Configure some transport options:
|
||||
|
||||
```caddy-d
|
||||
route /prefix/* {
|
||||
uri strip_prefix /prefix
|
||||
reverse_proxy https://example.com {
|
||||
transport http {
|
||||
dial_timeout 2s
|
||||
tls_timeout 2s
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Replace a path prefix before proxying:
|
||||
|
||||
```caddy-d
|
||||
handle_path /old-prefix/* {
|
||||
rewrite * /new-prefix{path}
|
||||
reverse_proxy localhost:9000
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue