CloudFront上的子域不起作用(证书不被接受)

时间:2019-04-23 12:41:24

标签: amazon-web-services amazon-cloudfront

  • 在证书管理器中,我有一个有效的证书,其中包括* .example.com域。
  • 在CloudFront中,我具有一个启用HTTP到HTTPS重定向的分发,并且CNAME字段为空。
  • 当我编辑发行版并在CNAME字段中输入staging.example.com并选择证书时,出现以下错误:
com.amazonaws.services.cloudfront.model.InvalidViewerCertificateException: The certificate that is attached to your distribution doesn't cover the alternate domain name (CNAME) that you're trying to add. For more details, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements (Service: AmazonCloudFront; Status Code: 400; Error Code: InvalidViewerCertificate; Request ID: 8406d8d5-65c3-11e9-afc0-65457a0a2bea)

我想念什么吗?顶级域的其他发行版使用相同的证书也可以正常工作。

2 个答案:

答案 0 :(得分:1)

想通了。

证书在错误的区域生成。 要在CloudFront发行版上使用的证书必须在us-east-1(弗吉尼亚州)上生成。

答案 1 :(得分:0)

确保仅尝试获取Dim ie As InternetExplorerMedium Dim HTML As HTMLDocument Dim HTML1, HTML2 As HTMLDocument URL = "xxxx" Set ie = New InternetExplorerMedium ie.Visible = True ie.navigate URL Do While ie.readyState <> READYSTATE_COMPLETE Or ie.Busy: DoEvents: Loop Set HTML = ie.document Set HTML1 = HTML.getElementById("_id0") Debug.Print HTML.getElementByTagName() '-----------------------------------------Not able to get the tag name Call HTML1.getElementById("logon:").setAttribute("value", "username") '---------Neither able to update the username & password too 来匹配单个子域。参见wildcard ssl on sub-subdomain

这就是说*.将匹配*.example.comsub1.example.com,但不会匹配sub2.example.com。最后,您不能申请sub2.sub1.example.com的证书。为了匹配最后一种情况,您必须请求*.*.example.com