Reverse proxy virtual directories to ports

1. The problem I’m having:

Firstly, I’m using Caddy with Docker. This seems to work fine although I’ve not been able to get any logging other than the basic “it’s started” and any errors I make in the Caddyfile.

I want to do this…

I have two working docker containers at…

I want to reverse proxy each of the above sites from

…respectively. Is this possible?

I haven’t a clue how to do this. I have tried various things, such as… {
    reverse_proxy /siteA/* localhost:8081

…but it just results in a 404 error (albeit from apache which is running in the container)

Worse… I can’t figure out how to enable more comprehensive logging to see what Caddy is trying to do.

Please excuse total newbie stuff but I’m deeply confused :slight_smile:

2. Error messages and/or full log output:


## 3. Caddy version:
If you installed Caddy as a Linux package, run `caddy version`.
If you're running Caddy with Docker Compose, run `docker-compose exec caddy caddy version`.
DO NOT say "latest" or "v2", as this is not a specific version.
Please check that you're already running the latest version listed at, since your issue might have already been fixed in a previous release.

## 4. How I installed and ran Caddy:
caddy:latest in docker

### a. System environment:
Ubuntu 22.04

### b. Command:

### c. Service/unit/compose file:

version: “3.9”

image: caddy:latest
restart: unless-stopped
- “80:80”
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
- caddy_data:/data
- caddy_config:/config


### d. My complete Caddy config:

### 5. Links to relevant resources:
<!-- Optional, but can help get us on the same page quickly. -->

Please mind you post’s formatting, it’s kinda broken.

Take a look at this article:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.