paste config here, replacing this text
use `caddy fmt` to make it readable
DO NOT REDACT anything except credentials
or helpers will be sad
3. The problem I’m having:
Many times, I need to stop-start the EC2 instance. Every time after the restart, the caddy configuration needs to be loaded manually by SSH to the server.
How can I auto-load the configuration file whenever the server is restarted. Just like other proxy providers (apache, nginx), their configuration can be saved inside /etc/nginx/ directory, is there such a way in the Caddy?
Also planning to use auto-scaling to automatically provision new instances on load. Without auto loading, everything a new instance is launched, I need to manually load the configuration.
You should probably be using the caddy-api service that the .deb ships with, instead of the caddy service. It’s optimized for running Caddy when primarily using the API. See the note here in the docs:
Thanks, @francislavoie Is there any guide on how to set up the caddy-api service and how to configure it to load specif configuration on boot?
The installation guide only gives the installation guide and not the configuration guide.
Thanks, @francislavoie Where will be the config (final_with_headers.json in my case) will be placed so that it will be loaded automatically? Do I need to provide the path to the config? Currently, it is placed in /home/user/final_with_headers.json.