如何设置 HTTPS 进行本地测试?
我需要了解 Web 应用程序如何与 HTTPS 配合使用。但我确实找不到太多有关它的信息。我尝试设置本地 Apache,但找不到 CA 权威来签署我的证书...提示?建议?
I need to see how a web application will work with HTTPS. But I can't really find much information around about it. I tried to set up my local Apache but I can't find a CA autorithy to sign my certificate... Hints? Suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
需要考虑的可能性有:
。 1 可能是使用最广泛的解决方案。您可以在此处找到说明。唯一的缺点是浏览器会抱怨未知的 CA。在 Firefox 中,您只需添加永久例外即可消除警告。 (Chrome 和 Internet Explorer 似乎都没有提供这样的选项。
) 2 通常需要花钱,因此它不是开发环境的热门选择。
编号。 3 可以免费获得(请参阅 https://www.cacert.org/),但它们也会触发浏览器警告。与 nr 的差异。 1是您可以将CA添加到您的浏览器的受信任机构中;然而,这是一个严肃的决定,需要认真考虑,因为它涉及安全问题。一般来说,我不会推荐它仅仅用于测试。
The possibilities to consider are:
Nr. 1 is probably the most widely used solution. You can find instructions here. The only disadvantage is that browsers will complaint about the unknown CA. In Firefox, you can just add a permanent exception and get rid of the warning. (Neither Chrome nor Internet Explorer seem to provide such option.)
Nr. 2 normally costs money so it isn't a popular choice for dev environments.
Nr. 3 can be obtained for free (see https://www.cacert.org/) but they also trigger a browser warning. A difference with nr. 1 is that you have the possibility of adding the CA to your browser's trusted authorities; however, that's a serious decision that requires serious consideration because of its security implications. In general, I would not recommend it for mere testing.
自签名证书(如前所述)可能是单个主机最简单的选择。
如果有几个主机,您可以创建自己的迷你 CA。有一些工具可以实现此目的,例如:
Self-signed certificates (as already mentioned) are probably the easiest option for a single host.
If there are a few hosts, you could create a mini CA of your own. There are tools for this, for example: