So, we have a feature where our customers (or tenants) have a subdomain on our site ex. thiercompany.oursite.com
That all works fine and we have a wildcard SSL cert with Letsencrypt and a wildcard CNAME for our site.
Another feature we'd like is to set up a subdomain on our site ex. tenant.oursite.com
and have our tenants set up a CNAME on their site to point to our subdomain and have an SSL cert we provide. This will allow our tenants to use our site with their domain name and their customers will think they're still on their domain. ex. checkout.theirdomain.com
CNAME to tenant.oursite.com
. I have achieved this but the issue is the wildcard SSL cent with Letsencrypt doesn't seem to work.
Is there a standard way to achieve this on our side (after the tenants set up the CNAME) where we can set up SSL automatically?
I am using DigitalOcean and LAMP stack (Ubuntu) and Laravel. I would like to use Letsencrypt if possible.
I was using Cloudflare and it seems if the tenant uses Cloudflare pointing to us our SSL cert works and shows https. I'd like to allow it to be simple for tenants to set this up and not need to worry about an SSL cert.
Any advice would be great and would love to post my findings for others to use.
Thank you.