I’ve currently got a node.js server that I call mainServer.js. It’s currently serving a bunch of my domains ad handling the routes for those based on the domain name in the request header.
I’d like to delegate serving of my sites to each individual site and have a main server just proxy the requests based on the domain name. So I’d have say server1 listening on port 8001 and caddy would forward server1.com to that port.
I’m wondering how would I implement https in this case? Delegate it to caddy and it will worry about that for all my domains? Or have each node.js server handle their own cert?
Another thing is these servers (server1, server2) will be serving files for a website. Do I need to do anything extra in a caddyfile than just :