amazon-web-services - AWS CloudFront 自定义 SSL 证书已禁用

标签 amazon-web-services ssl amazon-s3 dns amazon-cloudfront

我看过很多关于这个主题的帖子,但我无法解决这个问题,所以我发布了我的设置,以防有人知道需要更改什么?

  1. 我有一个通过 Namecheap 购买的域名。我设置了自定义 DNS 并添加了 4 个由 AWS Route 53 中的托管区域生成的名称服务器。通过 whois.net 进行的 DNS 查找显示了正确的值。

  2. 在 Route 53 中,我已将 A 记录添加到别名目标 xxxxxxxxxxxxxx.cloudfront.net。 因此流量到达 Route 53 并转到 CloudFront。

    <
  3. 在 CloudFront 中,我有一个分配。作为备用域名 (CNAME),我有以下值:

    • *.domain.com
    • www.domain.com
    • domain.com
  4. 在 origins 下,我有一个包含以下源域名的记录:

    • domain.com.s3-website.az-name-1.amazonaws.com
  5. 我在 S3 存储桶中托管网站。所有 HTTP 请求都设置为重定向到 HTTPS。

  6. 最后,我为以下域名创建并验证了一个证书:domain.com、www.domain.com、*.domain.com

    <

我已经阅读了一些我应该等待的答案,自定义 SSL 证书选项将被启用。然而,现在已经超过一天了,而且没有任何迹象表明会发生这种情况。

我的网站可以正常运行,但配置错误的证书(使用默认的 *.cloudfront.net)会在 Safari 中弹出一个警告窗口,更糟糕的是,在 Chrome 中会出现一个大多数人不会访问的警告页面绕过。

最佳答案

To use an ACM Certificate with Amazon CloudFront, you must request or import the certificate in the US East (N. Virginia) region. ACM Certificates in this region that are associated with a CloudFront distribution are distributed to all the geographic locations configured for that distribution.

http://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html

CloudFront 不像大多数其他服务那样是区域性服务。这是一项全局服务,只有一个本地区域 -- us-east-1。它看不到任何其他区域的 ACM 证书(如果您想将它们与 Elastic Beanstalk 或 Elastic/Application Load Balancer 一起使用,您可以在其他区域创建证书)。

根据您的描述,您没有在 us-east-1 中创建 ACM 证书。

在 us-east-1 中创建一个新证书,使用它的选项应该几乎立即在 CloudFront 中可用。

关于amazon-web-services - AWS CloudFront 自定义 SSL 证书已禁用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44230614/

相关文章:

amazon-s3 - 如何将多个域映射到 Amazon S3 上的同一个存储桶?

python - 如何使用 boto 将 zip 文件上传到 s3?

amazon-web-services - 带有 VYOS 的 AWS 区域间 VPN

amazon-web-services - 将参数添加到 AWS CloudFormation/CodePipeline 堆栈

amazon-web-services - 基于 'OR' 条件的 AWS SNS 消息过滤

google-app-engine - 尝试到达应用引擎端点时出现 SSLHandshakeException

apache - 将 Apache ssl 端口 443 转发到 Tomcat http 端口

ruby-on-rails - rails Assets :precompile during slug for s3 error: Fog provider and directory can't be blank when env are set

amazon-web-services - 如何获取 Amazon 的 AWS_ACCESS_KEY_ID?

ssl - 此错误 :-Requests to this API must be over SSL 的解决方案是什么