I have several web servers I would like to place being a Caddy server. This is because I want to have authentication and encryption (https) from the entry point.
The problem is that some of the web servers, e.g. the godoc web server, expects to be accessed as a root url on its host. E.g., in the returned html, is a reference to url ‘/lib/…’
I know I can either start using different hosts (e.g. go.myhost.com, wiki.myhost.com), or to rewrite all root URLs used by the backend web server (e.g. ‘/lib’ to godoc server, ‘/css’ to gollum server, etc), but I don’t like those solutions.
Is there a way to do similar to Apache’s mod_proxy_html, ref mod_proxy_html - Apache HTTP Server Version 2.4
It receives the response from the backend web server and rewrites all its URLs using URLs available externally.