Comments (5)
Hey @soakes
It was meant to be written as:
caddy.redir: "302"
caddy.redir.if: "{path} is /"
caddy.redir./: "/blog"
But this also works:
caddy.redir: 302
caddy.redir._0: "if {path} is /"
caddy.redir._1: "/ /blog"
And even this works (when using YAML):
caddy.redir: |
302 {
if {path} is /
/ /blog
}
Can you please try the options above?
from caddy-docker-proxy.
About the external proxy. Can you please describe how it is related to the domain?
Should /blog proxy to your docker container, and everything else to an external url?
from caddy-docker-proxy.
@lucaslorentz thank you very much for the in-depth examples, this is a great help thank you.
With regards to the external proxy, in short, I have several VPN's connected to several different locations. I am currently using the same caddy proxy to reverse proxy apps/vm's which are behind the VPN's as well as the usual docker apps etc from the main data center networks.
So for example, say vmware is running on another location which is accessible via VPN only (usually), this can be reverse proxied as well which the first last snippet is what I do which works great, however, I was struggling to do it via your awesome plugin.
HTH
from caddy-docker-proxy.
@soakes this would work
caddy.address: example.me.uk/blog
caddy.targetport: 2368
caddy.proxy: "/blog example_blog:2368"
caddy.proxy.websocket:
caddy.proxy.transparent:
caddy.redir: "302"
caddy.redir.if: "{path} is /"
caddy.redir./: "/blog"
from caddy-docker-proxy.
Thanks Jack.
from caddy-docker-proxy.
Related Issues (20)
- crashed/stopped container results in a 308 loop (bug?) HOT 5
- does caddy-docker-proxy support 443/udp? HOT 1
- Dynamically expose additional ports without restarting Caddy or target services HOT 21
- Container tag vs build version mismatch? 2.8-alpine reports v2.7.5 HOT 2
- Removing invalid block in Caddyfile HOT 5
- Trying to use the LinuxServer Nextcloud Docker returns public IPs. HOT 5
- Same domain in different swarm services of a stack HOT 5
- Upstreams macro not inserting container IP into caddy config HOT 3
- Containerizing a "Host" network docker image HOT 2
- Is there support for HAProxy/Proxy Protocol in CDP HOT 2
- Support IPv6-only containers
- risc-v releases? HOT 1
- Caddy Docker proxy + Authelia + Cloudflared (Argo Tunnel)
- Caddy Docker Proxy + Authelia + (Cloudflare Argo Tunnel) HOT 5
- Empty label caddy.reverse_proxy.transport.tls_insecure_skip_verify not expanding correctly HOT 1
- Caddyfile defaults HOT 1
- Cannot compile HOT 2
- [Q] Moving from plain Caddy HOT 3
- Use the same wildcard certificate for multiple sub domains HOT 4
- Reverse proxy doesn't work when using internal network HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy-docker-proxy.