1. Caddy version (caddy version
):
v2.4.6 h1:HGkGICFGvyrodcqOOclHKfvJC0qTU7vny/7FhYp9hNw=
2. How I run Caddy:
/caddy start
a. System environment:
Debian 4.19.208-1
d. My complete Caddyfile or JSON config:
:80 {
reverse_proxy /api www.example.com/path1/path2
}
3. The problem I’m having:
I wrote a script that makes POST requests with JSON data to a remote server.
And some reason this request needs to do from a particular (whitelist) IP which binding on the server.
So I decide on this whitelist IP server to install caddy server and just redirect my request from 1 to 2 through caddy server. No need to modify my request just need to redirect.
With provided config, I have an issue - yes redirect is working but redirect to www.example.com/api
But it’s not what I need.
Please help me handle this, thanks!
P.S
I’ve tried this config, but with https://
I get error config. Also tried without https://
- but nothing works
route /api {
uri strip_prefix /api
reverse_proxy https://example.com/path1/path2
}