gpt4 book ai didi

amazon-web-services - 如何为 Heroku 应用配置带 SSL 的 Amazon Route

转载 作者:太空宇宙 更新时间:2023-11-03 13:14:48 25 4
gpt4 key购买 nike

我需要将 Amazon 域设置为 Heroku 应用程序的自定义域。我找到了下一个教程https://devcenter.heroku.com/articles/route-53但如果应用程序需要 https 请求,它就不起作用。第一个想法是在 Heroku 中设置 SSL 证书,但是 SSL Amazon Domain manager 不允许下载证书,所以 SSL 需要由 AWS 管理。
将 Amazon SSL 添加到 Heroku 应用程序的最佳方式是什么?

最佳答案

我找到的最佳选择是创建一个 AWS CloudFront 并按照 Karan 在他的 answer 中描述的方式配置它但有一些附加组件:

  1. 从 AWS Certificate Manager 创建证书并批准它。

  2. 创建一个 CloudFront 分配,将源域名作为您的 Heroku URL,例如 myapp.herokuapp.com,并将自定义 SSL 证书作为您从 AWS Cert Manager 创建的证书。

  3. 创建分发时,确保 TTL 为 0,否则所有响应都将被缓存 enter image description here enter image description here如果您不完成此步骤,您可能会收到如下错误:

    This distribution is not configured to allow the HTTP request method that was used for the request. The distribution supports only cachable requests. enter image description here

  4. 按照我在问题 [https://devcenter.heroku.com/articles/route-53][4]

  5. 中提到的指南进行操作

关于amazon-web-services - 如何为 Heroku 应用配置带 SSL 的 Amazon Route,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47274624/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com