【发布时间】:2017-03-26 09:50:26
【问题描述】:
我有一个添加了 Heroku 的 SSL 的 Rails 5 应用程序。 www.example.com 和 example.com 工作正常,但是当我在我的网站前加上“https://”时它不起作用,但“http://”工作。
我使用 Namecheap.com 作为我的 DNS。如何让“https://example.com”定向到我的 heroku 应用?
【问题讨论】:
-
如果您使用 Heroku 托管服务器,如果使用 herokuapp 子域,则默认打开 https 端口。但是对于自定义域,您需要购买 SSL 证书! devcenter.heroku.com/articles/ssl-endpoint 第二件事实际上并没有重定向东西,你需要做的只是配置一个 CNAME 指向你的 Heroku 应用程序! devcenter.heroku.com/articles/custom-domains
标签: ruby-on-rails heroku https dns cname