I didn’t include the form because none of it is relevant to my question, but you can reference the form info in the first post here if you wish.
Background:
I am making http requests from server A to the Caddy API on server B to make configuration changes.
Problem:
The problem is, as described by Matt here, and here, that there is a circular dependency, because Caddy uses itself to proxy its own API, and I’m getting a shutting down admin server: context deadline exceeded error, and so requests are processed extremely slowly.
Question:
What is the proper way to configure Caddy so that I can send requests from server A to the Caddy API on server B and avoid this error?
If you enable this, you will also need to enable identity management so that Caddy (server B) has a certificate it can server to clients (like server A): JSON Config Structure - Caddy Documentation
{
"identifiers": [""],
"issuers": [{•••}]
}
All you need to fill out for this is an identifier, like so: identifiers: ["example.com"] and Caddy will use the default issuers (CAs) as usual (Let’s Encrypt and ZeroSSL).
AppMasker’s blog has a good tutorial for this (but ignore step 1, as your client is also a Caddy instance which can manage its own certificates, so don’t use openssl to generate one):
If we don’t need admin endpoint security (because server B is behind a firewall that only permits a few IP addresses to access port 2019), can we omit the access control, and do something simple like: