Hello! I’m trying to get Caddy to both reverse proxy POST requests to another port on localhost, and to act as a file server for GET requests. I’d prefer to use the command line interface if possible, or otherwise a Caddyfile. I tried searching, but I couldn’t find anything on this.
2. Error messages and/or full log output:
[none]
3. Caddy version:
2.7.6
4. How I installed and ran Caddy:
I followed the usual method for debian, i.e. adding the custom repo.
a. System environment:
Debian 11.7, x86-64, with systemd, without docker.
b. Command:
I tried asking Google Bard, but I think it made it up. It said to run both of these commands:
I’m mobile now so I can only be brief, but can expand later if still necessary.
You’ll have to use the Caddyfile. I wouldn’t take Bard’s answers as accurate for such usages. What you need is the method subdirective of the reverse_proxy directive. See the Rewrite section here.