1. The problem I’m having:
I’d like to set up a reverse proxy as below, but I’m having trouble creating the configuration. I currently have only ever used Caddyfiles, so, while I’m open to .json configuration, it’s not something I’m familiar with.
Setup
- 1 domain (eg. caddyserver.com)
- Standard HTTPS proxy (eg. https://caddyserver.com proxied to docker container on 8080)
- HTTPS API endpoint (eg. https://caddyserver.com:8081 or https://api.caddyserver.com, proxied to docker container on 8081)
I’m essentially attempting to host a website along with a publicly accessible API backend. I’d appreciate any help creating a configuration and knowledge on if it’s possible using a Caddyfile.
2. Error messages and/or full log output:
N/A
3. Caddy version:
v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=
4. How I installed and ran Caddy:
a. System environment:
Ubuntu Server
b. Command:
sudo apt install caddy
d. My complete Caddy config:
N/A