Proxying IP address with path

1. The problem I’m having:

I need to reverse_proxy 192.168.0.197/path/fileexample.domain.com/file
, but whatever I do I keep getting example.domain.com/path/file

2. Error messages and/or full log output:

I am not getting any errors

3. Caddy version:

v2.8.1 h1:UVWB6J5f/GwHPyvdTrm0uM7YhfaWb4Ztdrp/z6ROHsM=

4. How I installed and ran Caddy:

I installed stable caddy through the instructions on the official website for ubuntu

a. System environment:

Ubuntu running on a Proxmox CT with systemd

d. My complete Caddy config:

ded.example.com {
        reverse_proxy /ded/* 192.168.0.197
}

I also tried

ded.example.com {
        reverse_proxy 192.168.0.197/ded
}

Solution!

On the 192.168.0.197 server, installed caddy, and ran each of the directories under its own port.

192.168.0.197/website-1 -> 192.168.0.197:8001
...
192.168.0.197/website-6 -> 192.168.0.197:8006

Which made it much easier to then proxy the websites within a separate container.

Sounds like you were looking for handle_path. But keep in mind this article:

1 Like

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