1. Output of caddy version
:
v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=
2. How I run Caddy:
Docker image from Docker
a. System environment:
Docker
b. Command:
Paste command here.
c. Service/unit/compose file:
version: "3.9"
services:
caddy:
image: caddy:2-alpine
ports:
- 80:80
- 443:443
restart: unless-stopped
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/data:/data
- ./caddy/config:/config
d. My complete Caddy config:
https://dashboard.myco.com {
reverse_proxy https://dev.theirco.com {
header_up Host {upstream_hostport}
}
}
3. The problem I’m having:
I’m not sure it’s possible, but I’m paying for services from another company and would like to make it appear to be coming from my site to avoid customer confusion. Using the above Caddyfile, I can successfully direct traffic to the external site, but it triggers a 307 redirect error and changes the browser URL to their domain.
The behavior I’m hoping for is the customer browser always showing https://dashboard.myco.com/… but serving pages/data from https://dashboard.theirco.com/…
4. Error messages and/or full log output:
Paste logs/commands/output here.
USE THE PREVIEW PANE TO MAKE SURE IT LOOKS NICELY FORMATTED.
5. What I already tried:
My best result is the above Caddyfile.