Hello,
I’ve been trying to re-create my NGINX production environment with Caddy for local development. I have an NGINX proxy that proxies Home - Ownwebsite to 192.143.231.42:8080, e.g. Home - Ownwebsite would proxy to 192.143.231.42:8080/index, I would like to replicate that with Caddy…
So far I have this Caddyfile:
:1234
reverse_proxy /motorhead/ {
to 0.0.0.0:8081
}
But it gives me a 404 whenever I try to access the /motorhead/ uri even though 0.0.0.0:8081/ works fine and returns the correct HTML page. Reverse-proxying to / works but breaks all of my production HREFs…
But without any success sadly… I guess if @matt is working on it then I’ll just be patient and work on something else in the meantime, please do let me know when a fix goes live! Finally, let me know if there’s anything I can help with.
Just a heads up - this is a limitation of the Caddyfile (currently, and probably not for much longer), but you should still be quite capable of configuring this if you are willing to go to JSON configuration directly, which will give you much more control.
Substituting env variables is not done at the JSON parsing level. Placeholders are evaluated during module provisioning. Most Caddy modules honor placeholders where you would want them: Conventions — Caddy Documentation
If you find a field that doesn’t support placeholders that should, please let me know or submit a separate PR!