by BilalBudhani · 3y ago · 0 comments
I have moved all my servers from NGINX to Caddy for the pass few years and I couldn't be happier.
Also, I would like to give a shoutout to the team behind Caddy. They have been nothing but great about constantly shipping updates and being incredibly helpful in their community forum.
Put the following in your Caddyfile at the lowest scope to disable it:
{
admin off
}It would be more appropriate to handle signals, particularly SIGHUP. That's how most services have been handling reloads.
It's fine to offer an admin API, especially if I want a peer to be able to affect the local instance, but this shouldn't be the position init is placed in.
Put simply, the init process is what we depend on if everything else fails.
What if rm would by default just delete everything, as it assumes that makes sense? Stupid comparison, I know, also a stupid default.
https://caddyserver.com/docs/json/admin/remote/access_contro...
admin listen unix//var/run/caddy/admin.sockA blind SSRF vulnerability (with payload control) in your application could be used to gain full control over the reverse proxy resulting in the attacker gaining full unfettered access to your network.
If you're not using it (and you shouldn't be using such functionality on a production machine), then you don't need it and should disable it, see: https://owasp.org/Top10/A05_2021-Security_Misconfiguration/
Edit, I just checked the Caddyfile for one of my sites. There is no config for redirecting HTTP to HTTPS is does it automatically. So this is entirely unnecessary.
This is unrelated to sites hosted using HTTP. I was clumsily using the term "HTTP" to refer to the fact that this configuration mechanism is based on HTTP-communication.
Seems counter to their objective of having secure defaults.
I'm also a huge fan of Caddy's "handle" and "handle_path" directives for their simplicity.
One thing I will say against it though is that it does seem to run a little hotter than Nginx on my Pi4. Just random spikes here and there, whereas Nginx barely used to blip.