Caddy
Introduction
Caddy is running with a resumed configuration. The --resume
flag means Caddy is using the last known good configuration, which is stored internally as a JSON object. This configuration is auto-saved when Caddy is running and can be reused on restarts or reloads. It does not necessarily rely on a Caddyfile.
1. Examine the Current Configuration:
You can query Caddy's API to see the current JSON configuration:
curl http://localhost:2019/config/
2. Export the Current Configuration:
If you want to save the current JSON configuration to a file, you can redirect the output of the curl command:
curl http://localhost:2019/config/ > caddy_config.json
3. Modify Configuration
You can either modify the JSON configuration directly through the API:
curl -X POST "http://localhost:2019/load" \
-H "Content-Type: application/json" \
--data @path/to/modified/caddy_config.json