I have a site that needs to answer on any number of arbitrary subdomains, e.g. client1.example.com
, client2.example.com
, etc. Everything is behind SSL.
I'd really like to use Let's Encrypt which, of course, means no wildcard cert. Is there any way to create a single server { ... }
block that loads the appropriate directory or do I need separate config for every client subdomain?
Essentially, I want one server
block answering to *.example.com
, but loading the appropriate certificate based on the subdomain. Certificates are all stored in /etc/letsencrypt/live/[subdomain].example.com/
.