如何为本地测试目的设置 HTTPS? [英] How to set up HTTPS for local testing purposes?

查看:29
本文介绍了如何为本地测试目的设置 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?

推荐答案

可以考虑的可能性有:

  1. 生成您自己的证书(自签名证书)
  2. 获取由已知颁发者颁发的证书
  3. 获取浏览器无法识别的颁发者颁发的证书

编号.1 可能是最广泛使用的解决方案.您可以在此处找到说明.唯一的缺点是浏览器会抱怨未知的 CA.在 Firefox 中,您可以添加一个永久异常并消除警告.(Chrome 和 Internet Explorer 似乎都没有提供这样的选项.)

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.)

编号.2 通常需要花钱,因此它不是开发环境的热门选择.

Nr. 2 normally costs money so it isn't a popular choice for dev environments.

编号.3 可以免费获得(参见 https://www.cacert.org/)但它们也会触发浏览器警告.与 nr 的区别.1 是您可以将 CA 添加到浏览器的受信任权限中;然而,这是一个严肃的决定,需要认真考虑,因为它涉及安全问题.一般来说,我不会推荐它仅仅用于测试.

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.

这篇关于如何为本地测试目的设置 HTTPS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆