4 ms·
If you want to do this yourself, caddy http server [0] works really well and is incredibly easy to use / setup. They even have an example on their home page th
by Prefinem 9y ago
If you want to do this yourself, caddy http server [0] works really well and is incredibly easy to use / setup. They even have an example on their home page that shows this for /api and /blog
[0] https://caddyserver.com/ https://caddyserver.com/
- kodablah 9y agoAlternatively: https://traefik.io/ https://traefik.io/
- mrkurt 9y agoIt works pretty well with nginx too: https://fly.io/articles/delivering-multiple-applications-on-one-hostname/ https://fly.io/articles/delivering-multiple-applications-on-... It's trickier than it seems, though, because you need to get the right combination of Host/X-Forwarded-Host right for a given hosting service. And you frequently need to rewrite HTML to fix links. Not rocket surgery, but usually I'd rather put my hours into dev and not tweaking a proxy.
- tokenizerrr 9y agoWhich is why people just use subdomains. Far less hassle, works fine.
- rcthompson 9y agoThis is exactly what I use to run a bunch of different personal services in subfolders on the same hostname. Sadly, though some things don't support running in subfolders.
- falsedan 9y agoUse nginx to lie to them so they think they're running at the server root?
- fiatjaf 9y agoEverything is easy if you're hosting all your stuff in the same machine. It gets complicated if you're using third party services, PaaS etc.
- notamy 9y agoPretty specific use-case, but if you use Rancher for Docker orchestration, the built-in load-balancer service that you can deploy makes this pretty easy.