1. Caddy version (caddy version
):
2.0.0-2.fc31
2. How I run Caddy:
Using Caddyfile as a reverse proxy from localhost.
localhost
reverse_proxy destination.com {
lb_policy header X-My-Header
}
a. System environment:
Ubuntu 20.04
b. Command:
sudo caddy start
d. My complete Caddyfile or JSON config:
localhost
reverse_proxy destination.com {
lb_policy header X-My-Header
}
3. The problem I’m having:
Sorry if this is a Noob question, I have been trying to set up Caddy as reverse proxy such that any client in the network can use the proxy address that mirrors the destination without actually redirecting it. When i set it up, Caddy seem to be redirecting localhost (when testing inside the Caddy machine) to the destination. You can think of what i want to achieve as masking the real URL in Caddy.
4. Error messages and/or full log output:
Server works, but redirects to the address.
5. What I already tried:
I was thinking i should be making a local host and use srv+http://localhost:5099 on the upstream field to use it as the mirror.
6. Links to relevant resources:
Request matchers (Caddyfile) — Caddy Documentation (Should it be a POST request?)
I am sorry if the question sound dumb