I don’t believe Caddy itself has any method to connect to Redis and inject the results into a templated PHP file (presumably you then want to actually process that PHP script).
Well, I actually want to connect to redis to lookup values based on the URL from the webserver and inject those either as templates or environment variables into my php script that bootstraps the app.
This is basically to connect to different database. I think i can accomplish this is nginx/openresty/lua, but was really liking some of what caddy had to offer.
Perhaps I don’t understand your setup. You can’t parse the URL within your PHP bootstrap script itself? What calls your bootstrap script, exactly? Surely you’d be able to take the request from Caddy, manipulate it in PHP to get the info you need, connect to Redis to get the corresponding values, then proceed as normal.