1. Caddy version (caddy version
): v2.4.5
2. How I run Caddy:
caddy run
a. System environment:
Mac
My complete Caddyfile or JSON config:
localhost:2015
handle {
uri strip_prefix /{http.request.uri.path.0}
reverse_proxy {
to www.{http.request.uri.path.0}:443
header_up Host {http.reverse_proxy.upstream.host}
transport http {
tls
}
}
}
3. The problem I’m having:
I am trying to dynamically reverse-proxy a url like localhost:2015/google.com/robots.txt
to www.google.com/robots.txt
Any ideas on how I can go about it?
4. What I already tried:
I tried the above Caddyfile but it rewrites the path before sending upstream.