-
|
Hi everyone! I'm setting up Caddy Proxy Manager using Docker, but I'm having trouble remapping my old Caddy base configuration via the GUI to CPM. However, I haven’t been able to map it to CPM. Solution A – defining a proxy-host:
In this case, I have the problem that I don’t want to change the URL path of orignal services, otherwise for every new service I’d have to go and modify the various service configurations. I also tried the Custom Reverse Proxy (JSON) without any success :-( Solution B - defining 2 L4 proxy hosts:
but I haven’t been able to get the service to work in any way. Thanks for the amazing work! It's a really great project, and as soon as I saw it, I fell in love with it! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
Hi @ale17z, thanks for the kind words! Looking at your Caddyfile, you're binding the same domain to different custom ports ( CPM doesn't support custom listen ports for individual reverse proxy hosts — all HTTP proxy hosts are served on port 443 (HTTPS) by default, which is the standard and recommended approach. Recommended approach — use subdomains instead of custom ports: Instead of
If you need to restrict access to these internal services, you can use Access Lists (ACLs) to limit access by IP range (e.g., only allow your local network Regarding the security headers ( The L4 proxy approach is meant for raw TCP/UDP forwarding (e.g., databases, game servers) and isn't the right tool for HTTP reverse proxying. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
|
Good point about DuckDNS not supporting fourth-level subdomains. Regarding "strip prefix" — I should correct myself, CPM doesn't have that option. What it has is a Path Prefix Rewrite (under proxy host settings) which prepends a prefix to requests, which is the opposite of what you need. Since there's no built-in strip prefix, you have two choices:
I'd recommend option 1. Serving multiple services under path prefixes on the same domain is generally not recommended from a security perspective — it means all services share the same origin, which weakens isolation (cookies, CORS, CSP policies all become shared). Regarding access control — if you want to restrict who can reach these services, you can use the Geo Blocking feature on each proxy host to allow/deny access by country or IP address/range. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the information, please specify which sha256 commit you're running since there have been bug fixes regarding this, you may want to try updating first (also please avoid raising new issues in a resolved one, raising new ones should be the way) Regarding processed requests I'll think if there can be a good implementation UX wise to show them |
Beta Was this translation helpful? Give feedback.
Hi @ale17z, thanks for the kind words!
Looking at your Caddyfile, you're binding the same domain to different custom ports (
:4010,:4020) and reverse-proxying each to a different backend. This is a somewhat unusual Caddy setup — typically you'd serve everything on the standard HTTPS port (443) and differentiate services by subdomain or path.CPM doesn't support custom listen ports for individual reverse proxy hosts — all HTTP proxy hosts are served on port 443 (HTTPS) by default, which is the standard and recommended approach.
Recommended approach — use subdomains instead of custom ports:
Instead of
XXXXX.duckdns.org:4010andXXXXX.duckdns.org:4020, create separate subdomains (or use path…