Using public SSL for dynamic domains to map on single cloudfront

限于喜欢 提交于 2020-04-30 09:27:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!