Web / Caddy Server Interview questions
What is the Caddy admin API?
The admin API is a REST endpoint, listening on localhost:2019 by default, through which Caddy's entire running configuration can be inspected and changed at runtime.
curl localhost:2019/config/ curl -X POST localhost:2019/load \ -H "Content-Type: application/json" \ -d @caddy_config.json
Every Caddy instance runs this API automatically unless it's disabled with admin off. Tools like caddy reload and the systemd reload action work by pushing new JSON to this endpoint, which lets Caddy swap configuration live rather than restarting the whole process. The listen address can be changed with the CADDY_ADMIN environment variable or the admin global option, and it should generally stay bound to localhost or a trusted network in production.
More Related questions...