Run caddy to proxy requests to multiple upstream servers running on different ports on the same box.
On the box you want to analyze:
# Download caddy
mkdir -p caddyserver && cd caddyserver
wget <>
tar -xzvf <>
cd -
# Add the Caddy file, flask server from this example
# Start caddy
./runserver.sh
Create a wildcard route to your server (*.myhost.com
). Route 53 works well for this.
In your browser:
- Visit http://a.myhost.com. You should see
Hello World from port 8091!
- Visit http://b.myhost.com. You should see
Hello World from port 8092!
The Caddyfile
in the current directory makes caddy serve to
- http://a.myhost.com/ -> 8091
- http://b.myhost.com/ -> 8092
what