How I run Caddy: Using the official (alpine) Docker image.
Hello everyone,
I’m trying to set Caddy as Reverse Proxy in front of a Rails app and I’d like to make sure Caddy caches and serves the static assets (CSS, JS, images).
root is just the path to the files on disk inside your Caddy container. It’s unrelated to your reverse_proxy. It just tells Caddy’s file_server where to read the files from.
That said, I realized I made a mistake – the root should be outside of the handle in that above config, because the file matcher also needs to know what the webroot is, to be able to find if the file does indeed exist.