mirror of
https://github.com/caddyserver/website.git
synced 2025-05-06 11:47:12 -04:00
docs: Update reverse_proxy examples
This commit is contained in:
parent
e2a6e4e212
commit
d406814cfb
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
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Strip a path prefix then proxy with a new path:
|
||||
|
||||
```caddy-d
|
||||
handle_path /prefix/* {
|
||||
rewrite * /foo{path}
|
||||
reverse_proxy localhost:9000
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue