Hello All, I am running an application that has about 200,000 subdomains and 15,000 custom domains. Each subdomain belongs to a customer and they have an ability to white label my platform by using their own ‘custom domains' I currently have only 1 nginx configuration file to serve all of these domains. I make use of $http_name variable to dynamically define my websites within single nginx virtual host config but I’d like to implement SSL certificate on all of them. 200,000 subdomains are easy because I can get away with couple of lines of code with a wildcard certificate. My problem is custom domains. These 15,000 unique domains requires SSL cert and I implemented Let’s encrypt to generate certificate for all of them. It works properly so far. Here is my question: My understanding is that I cannot use variables in file paths. Therefore, to be able to point 15k domain to proper SSL cert, I need to create 15,000 nginx configuration. It’s going to be very hard to manage. What can I do to overcome this problem? Is there any other easy way?
Hey! Instead of using Nginx, you could try Caddy server it comes with "Automatic Https" provided by let's encrypts but you don't need to configure every subdomain https://caddyserver.com/docs/automatic-https