3 ms·
I use caddy mostly as a reverse proxy in front of an app. It's just one line in the caddy file: sub.domain.com { # transparent proxy + websocket supp
by abdusco 4y ago
I use caddy mostly as a reverse proxy in front of an app. It's just one line in the caddy file:
sub.domain.com {
# transparent proxy + websocket support + letsencrypt TLS
reverse_proxy 127.0.0.1:2345
}
It's a fresh breath of air to have server with sensible defaults after dealing with apache and nginx (haproxy isn't much better in that regard).
- mholt 4y agoIf that's your whole Caddyfile, might as well not even use a config file: caddy reverse-proxy --from sub.domain.com --to :2345 Glad you like using Caddy!
- bmurphy1976 4y agoPersonally I still recommend the config file. Even when they are simple, it gives you one single source of truth that you can refer to, it will grow as you need it, and it can be stored in source control. Where and how parameters are configured is a bit more of a wild card and dependent on the environment you are running in.
- francislavoie 4y agoThat's something Matt and I tend to disagree on - I agree that a config file is better almost always because it gives you a better starting point to experiment with other features.
- mholt 4y agoHey, I mean, I do agree that a config file is "better" most of the time -- but having the CLI is just so awesome! :D
- CoolCold 4y agoI still cannot make myself to try Caddy.. in things like this looks sweet but just may be 5% of the functionality [I care about]. Not saying it's not possible, but with Nginx I already know how to do list of CORS, OPTIONS , per location & cookie name caching. Issuing certs is probably simplest and the last thing in config setups of reverse proxying.