我有麻烦了。
我有一个在 heroku 上运行的网站,它使用来自其他提供商的自定义域。我用正确的 DNS 在两者之间建立了连接。
它似乎可以在我的浏览器上运行,但在其他计算机上不起作用,并且在清除我的缓存后,它在我的计算机上也不起作用。当他们访问该网站时,它会显示域名提供商网站。
起初我以为它与 ssl 有关,因为我收到错误消息说您的连接不是私密的。然后我将 config_force_ssl 更改为 false:
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = false
我的域提供商 DNS 设置中的 A 记录似乎链接到 IP 地址,而 Heroku 不支持 IP 地址。或者它仍然可能与 ssl 相关。
这是我的域提供商 DNS:
ftp.example.io - CNAME - example.io
www.example.io - CNAME - example-example.herokuapp.com
example.io - A - 91.184.0.100
localhost.example.io - A - 91.184.0.100
webmail.example.io - A - 91.184.0.100
*.example.io - A - 91.184.0.100
mail.example.io - A - 91.184.0.94
这是我在 heroku 上添加的域:
Domain name: example.io
DNS Target: example-example.herokuapp.com
我不知道它会是什么。任何帮助将不胜感激
最佳答案
您应该在 DNS 提供商上创建一个 CNAME 记录:https://devcenter.heroku.com/articles/custom-domains
关于ruby-on-rails - 链接到域提供商网站的 Heroku 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37841189/