ssl - 在 Heroku 中配置 SSL 失败
问题描述
我在 Google 域购买了一个域名。(例如:example.net)
但我未能在 Heroku 配置 SSL(我使用爱好 dynos)。
ACM 总是失败,我不知道如何使用它。
在 Heroku 中:
我在网站中添加域,而不是 CLI,它就出来了
Domain Name DNS Target
example.net <random String>.herokudns.com
然后在我设置 的合成记录中的谷歌域中
@.example.net ->http://www.example.net
Temporary redirect (302)
Do not forward path
Enable SSL
在自定义资源记录中
Name Type TTL data
www CNAME 1H <random String>.herokudns.com
在所有这些之后,我点击 config SSL-Automatically 我得到的只是
ACM is failing for 1 domain name
example.net - CDN not returning HTTP challenge
我检查了文档
CDN not returning HTTP challenge
Heroku ACM is attempting to to verify that the HTTP challenge file is being
returned, but is encountering a 404 error. This typically happens when you
are pointing your domain at a CDN, rather than the Heroku provided DNS
target, and the HTTP challenge file does not exist on the CDN.
This typically happens with AWS CloudFront.
解决方案
对我有用的是将合成记录设置为
Temporary redirect (302)
Forward path
Enable SSL
简而言之,我选择了正向路径,并且我在 heroku 中的应用程序与在谷歌购买的 Hobby dyno + 域中运行良好。
推荐阅读
- javascript - 两个 URL 链接并在第一个打开的 URL 页面中打开第二个 URL
- javascript - 为什么在使用 alert 和 console.log 的情况下 javascript Promise 会表现得很奇怪?
- python - 在 Pandas 循环中计算缺失值
- wordpress - .htaccess - 将文件夹重写到域
- python - Setting up Sentry not working - nothing sent to Sentry
- css - 在保持响应性的同时一张一张显示图像
- oracle - 如何在登录表单 Oracle Forms Builder 中调用警报消息?
- mathjax - Sandcastle 文档和 Mathjax
- sql - 如何在汇总后排序而不是拆分分组?
- exception-handling - NestJs - 从异常过滤器发送响应