Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslorentz authored May 28, 2020
1 parent 7c92f90 commit e04d00c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,32 +237,34 @@ caddy.reverse_proxy = {{upstreams}}
Proxying domain root to container path
```
caddy = example.com
caddy.0_rewrite = * /target{path}
caddy.1_reverse_proxy = {{upstreams}}
caddy.rewrite = * /target{path}
caddy.reverse_proxy = {{upstreams}}
```

Proxying domain path to container root
```
caddy = example.com
caddy.reverse_proxy = /source/* {{upstreams http 8080}}
caddy.route = /source/*
caddy.route.0_uri = strip_prefix /source
caddy.route.1_reverse_proxy = {{upstreams}}
```

Proxying domain path to different container path
```
caddy = example.com
caddy.route = /source/*
caddy.0_uri = strip_prefix /source
caddy.1_rewrite = * /target{path}
caddy.2_reverse_proxy = {{upstreams}}
caddy.route.0_uri = strip_prefix /source
caddy.route.1_rewrite = * /target{path}
caddy.route.2_reverse_proxy = {{upstreams}}
```

Proxying domain path to subpath
```
caddy = example.com
caddy.route = /source/*
caddy.0_uri = strip_prefix /source
caddy.1_rewrite = * /source/target{path}
caddy.2_reverse_proxy = {{upstreams}}
caddy.route.0_uri = strip_prefix /source
caddy.route.1_rewrite = * /source/target{path}
caddy.route.2_reverse_proxy = {{upstreams}}
```

Proxying multiple domains to container
Expand Down Expand Up @@ -479,4 +481,4 @@ docker rm -f caddy whoami0 whoami1

You can build caddy using [xcaddy](https://github.com/caddyserver/xcaddy) or [caddy docker builder](https://hub.docker.com/_/caddy).

Use module name **github.com/lucaslorentz/caddy-docker-proxy/plugin/v2** to add this plugin to your build.
Use module name **github.com/lucaslorentz/caddy-docker-proxy/plugin/v2** to add this plugin to your build.

0 comments on commit e04d00c

Please sign in to comment.