I'm just saying that it's not something that is documented well or purpose built for that scenario.
The SDS (Secrets Discovery Service) supports this, and is touched on in TFA: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overv...
You provide a gRPC service that can return the keypair needed for any host, with host config also being dynamic.
https://www.envoyproxy.io/docs/envoy/latest/configuration/se...
https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_SSL...
> A traditional problem with SSL in combination with name based virtual hosting has been that the SSL connection setup happens before the HTTP request. So at the moment lighttpd needs to send its certificate to the client, it does not know yet which domain the client will be requesting. This means it can only supply the default certificate (and use the corresponding key for encryption) and effectively, SSL can only be enabled for that default domain. There are a number of solutions to this problem, with varying levels of support by clients.
Then, the best approach seems to be the following:
> Server Name Indication (SNI) is a TLS extension to the TLS handshake that allows the client to send the name of the host it wants to contact. The server can then use this information to select the correct certificate.
Our initial use-case was ingress for docker swarm - after a fooray into k8s with the "traditional" nginx ingress with its rather hackish let's encrypt contraption.
I briefly looked at caddy 2 - but wasn't able to find any out-of-the box tricks for listening to docker messages and dynamically configure sites in a sane way.
Do you use custom code and configure caddy via the api?
Like this? (Am not a Docker user, but I know this is an insanely popular solution) https://github.com/lucaslorentz/caddy-docker-proxy
There's also a WIP ingress controller: https://github.com/caddyserver/ingress/
I don't think hitch (formerly stud) supports acme challenges, but that's where I'd start.
Caddy is the closest, but still not near enough.
There is this small segment of the market that we operate in that requires thousands of TLS connected domains to be hosted behind a dynamic backend. It's services like Tumblr, Wordpress.com, or any other hosting service where you can get a "custom domain" to point to your own blog or site.
NGINX - No.
Apache - Nope.
Caddy - Can do (but need lots of workarounds)
Envoy - Nope.
Everyone focuses on a few hand-coded domains and no automatic TLS. Maybe this part of the market is too small anyway. Sigh.