我尝试使用AWS S3和CloudFront为我们的Web平台设置静态托管解决方案。需要使用https,并且需要通过自定义子域访问。
这是我的S3存储桶:
这些是CloudFront的设置:
,
证书设置看起来没问题:
最后,我的DNS记录如下:
目标是通过https在static.dmaglobal.com/logo-frontpage.png上提供资源。它没有问题地加载(http://static.dmaglobal.com/logo-frontpage.png),但https版本(https://static.dmaglobal.com/logo-frontpage.png)会出现SSL错误,指出当前证书为*.s3.eu-west-2.amazonaws.com而不是*.dmaglobal.com。我不明白这个不匹配来自哪里,因为它似乎已经为我们的自定义域正确设置了证书。
有人能够提供如何处理此问题的指针吗?
这是我的S3存储桶:
![enter image description here](https://istack.dev59.com/uSW5J.webp)
![enter image description here](https://istack.dev59.com/MoEtB.webp)
![enter image description here](https://istack.dev59.com/rgqGr.webp)
![enter image description here](https://istack.dev59.com/rlKYi.webp)
CNAME:"static" -> "d1fd407fp9coo4.cloudfront.net."
编辑:使用默认域名提供商进行DNS,而不是Route 53。目标是通过https在static.dmaglobal.com/logo-frontpage.png上提供资源。它没有问题地加载(http://static.dmaglobal.com/logo-frontpage.png),但https版本(https://static.dmaglobal.com/logo-frontpage.png)会出现SSL错误,指出当前证书为*.s3.eu-west-2.amazonaws.com而不是*.dmaglobal.com。我不明白这个不匹配来自哪里,因为它似乎已经为我们的自定义域正确设置了证书。
有人能够提供如何处理此问题的指针吗?