It sounds like @MikeMcQ found a potential directive that can be used to segment the certificates for you. I would try a small test with that and, if it doesn't work, I would reach out to the developers of the mod_md.
That being said, while I don't know what each of your various domains are configured to do under Apache, I think this difficulty may be over-complicated due to the architecture of your system, and different infrastructures may work better.
Apache typically isn't the best server to handle high throughput or hundreds of domains. With setups like yours, it is not uncommon to have HTTPS terminated on a gateway server or a websever that excels at high connections (like nginx). It is also not uncommon to see a setup where domains are partitioned into multiple Apache (or Nginx) configurations.
For example:
- port 80: "Vanilla" Apache or nginx. Accept all the domains, proxypass into 3 different ip ranges, each range served by a different Apache master/config. Potentially terminate SSL
** port 8080 : assign 99 domain names
** port 8081 : assign 99 domain names
** port 8082 : assign 99 domain names
When it comes to obtaining certificates and ssl, you then have several options two of which include:
-
The 8080, 8081, 8082 servers each have mod_md. because they each have 99 domains, you will inherently meet the limits so you can let mod_md run as normal on each of the 99 domain name sets.
-
The port 80 server terminates the SSL, and uses proxypass of the acme-challenge directory to Certbot running in standalone mode on a higher port to handle ACME..
To manage all this, you could write some simple scripts to partition the domains and manage them. Ideally each host has been defined in it's own include file already, so you're often managing symlinks.
In terms of using other acme-clients, my suggestion for a setup like this would be to do something like this:
1- terminate SSL on nginx or a gateway on port 80, then proxypass back to apache. domains could easily be enrolled/unenrolled via a script to generate and manage the config files. nginx and gateways are fairly lightweight and great with concurrency.
2- manually assign certificates to virtualhosts, then run certbot in standalone mode via a proxypass.
Certbot does not do well managing hundreds of server blocks on any package. I believe nginx has more issues.
I will also stress that running many domains on any single certificate is not a good idea anymore. At one point it was recommended for many reasons, but in practice has caused many issues as any single failed domain will block reissue. Because many clients do not properly cleanup pending authorizations on failed orders, these can stack up and ratetlimit an account.
Personally, I would run nginx on port 80 and proxypass back to multiple apaches. I would have each domain run it's own certificate, and i'd have certbot do the work in standalone mode on a higher port. I'd use fabfile.org to write a script that can be invoked to enroll domains and remove them from the system. i.e. enrolling would assign the domain to an apache config file, generate a stub include file for that domain's host, and manage the proxypass from nginx onto the right apache port, and invoking Certbot to get the certificate.