[英]Do I need to buy an SSL certificate for my new domain?
I was hosting my app on Heroku and it said it was "secure" in the domain bar with no problem.我在 Heroku 上托管我的应用程序,它说它在域栏中是“安全的”,没有问题。 I have the following setting on:我有以下设置:
SECURE_SSL_REDIRECT = True
Now I added my own domain and reconfigured my app to point to the domain.现在我添加了自己的域并重新配置了我的应用程序以指向该域。 Did I lose some sort of SSL by doing this?我这样做是否丢失了某种 SSL?
Sometimes now I get an error when I try to load the webpage that says:现在,当我尝试加载显示以下内容的网页时,有时会出现错误:
ERR_SSL_UNRECOGNIZED_NAME_ALERT ERR_SSL_UNRECOGNIZED_NAME_ALERT
Maybe.也许。
Heroku provides HTTPS automatically for default myapp.herokuapp.com
domains, but for custom domains you'll have to do a bit of extra work. Heroku 自动为默认的myapp.herokuapp.com
域提供 HTTPS,但对于自定义域,您必须做一些额外的工作。
The easiest solution is to use Automated Certificate Management , which is powered by Let's Encrypt .最简单的解决方案是使用由Let's Encrypt提供支持的自动证书管理。 This can be as easy as running这可以像跑步一样简单
heroku certs:auto:enable
However, this feature is only available for paid dynos.但是,此功能仅适用于付费测功机。 It's "free" in the sense that it is included with paid dynos, but if you aren't already on a paid dyno you'll have to upgrade to use it.它是“免费”的,因为它包含在付费测功机中,但如果您还没有使用付费测功机,则必须升级才能使用它。
If you don't want to use ACM for whatever reason, you can also bring your own certificate with Heroku SSL .如果您出于某种原因不想使用 ACM,您也可以使用Heroku SSL自带证书。 Configuration is a bit more involved, but you get more control over the certificate vendor and you can use it with free dynos if you wish.配置有点复杂,但您可以更好地控制证书供应商,如果您愿意,可以将其与免费的 dynos 一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.