1. The problem I’m having:
I’m trying to make a reverse proxy to a certain website on a specific path, in other words, I want “mydomain.com” to show the contents of “42 (number) - Wikipedia”. Instead of this, the server seems to show only the contents of the website I’m proxying, no path.
2. Error messages and/or full log output:
There are no error messages
3. Caddy version:
v2.8.4 with docker compose
4. How I installed and ran Caddy:
Docker on archlinux
a. System environment:
Arch Linux x86_64, 6.10.8-arch1-1, Docker version 27.2.0
b. Command:
docker compose up -d
c. Service/unit/compose file:
caddy:
image: caddy:latest
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ~/docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- ~/docker/caddy/caddy_data:/data
- ~/docker/mystery/:/var/www/mystery
d. My complete Caddy config:
mydomain.com {
rewrite * /wiki/42_(number)
reverse_proxy https://en.wikipedia.org
}