问题
I am creating a portal where I am letting my customers map their domains or sub-domains to my CloudFront distribution. So, this way customer comes in and enter a domain name "domainname.com" or "test.domainname.com", and this domain will hit to my CloudFront distribution.
I know that we cannot add multiple certificates in CloudFront, but let me explain my requirements.
We have a site builder. The site builder application is hosted on my server which is on my datacenter which is NOT on Amazon and no plans to move it on Amazon.
The customer comes in and enters a domain name example customer.com. We will generate the Public SSL certificate for this domain and then will add a new record on our hosted zone under route53 saying customer.mycompany.com. This is because we created a wildcard certificate for *.mycompany.com and mapped to the CloudFront.
Now we can able to browse the site with customer.mycompany.com successfully. Though if I am adding a CNAME for customer.com to route to customer.mycompany.com, it is not picking the certificate from amazon for customer.com and CloudFront is not accepting the request from customer.com.
Things which I already finished:
I am able to generate the SSL through web API. I also have done with setting up wildcard certificate for *.mycompany.com. I also finished creating a subdomain record in route53 for customer.mycompany.com and point it to my CloudFront distribution.
Now I am stuck at if the user browses customer1.com or 2, 3, or any it should route to my CloudFront with picking the SSL certificate from Amazon.
It would be great for any help, please.
来源:https://stackoverflow.com/questions/57790214/using-public-ssl-for-dynamic-domains-to-map-on-single-cloudfront