ssl - 在本地主机 IIS 上启用 SSL

标签 ssl https localhost ssl-certificate

我在 Windows 8.1(Mac 上的 Bootcamp)上运行 localhost,需要启用 ssl。

我已经在 127.0.0.1 和本地主机上拥有默认的服务器证书。 我在端口 443 上将本地主机分配给了我的网站。

https 仍然返回安全错误,所以我需要处理 http

我的网站在 44300 端口上运行(例如 localhost:44300) 我尝试将证书绑定(bind)到44300,还是不行。

如何让我的本地主机使用 https?谢谢

enter image description here

enter image description here

enter image description here

编辑

证书由本地主机颁发,并在受信任的根证书颁发机构内:

enter image description here

顺便说一句,我按照这个主题为我的网站颁发了证书:Enable SSL in Visual Studio

最佳答案

可能是因为Trusted Root Certification Authorities没有安装

enter image description here

通过启动 mmc.exe 解决这个问题。

然后去:

文件 -> 添加或删除管理单元 -> 证书 -> 添加 -> 计算机帐户 -> 本地计算机

展开 Personal 文件夹,您将看到您的 localhost 证书:

enter image description here

将其复制到 Trusted Root Certification Authorities - Certificates

最后一步是打开 Internet Information Services (IIS) Manager 或简单地打开 inetmgr.exe。从那里转到您的站点,选择 Bindings...Add...Edit...。设置 https 并从下拉列表中选择您的证书。

enter image description here

您的证书现在是可信的:

enter image description here

原答案:

https://stackoverflow.com/a/48790088/3850405

关于ssl - 在本地主机 IIS 上启用 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30240014/

相关文章:

java - 调用 HttpsURLConnection.getCipherSuite() 时出错

mysql - Socket.io 无响应,Node.js

google-chrome - 对于运行 Windows 7 的计算机,Chrome 上的 SSL 问题 NET::ERR_CERT_DATE_INVALID

firefox - 允许使用 Firefox 的 SSL 中间人

amazon-web-services - 无法获取 LetsEncrypt SSL 证书以与 AWS Lightsail 配合使用

django - 如何在本地测试使用 example.com 域访问它的 Django 项目?

javascript - 使用 ruby​​ 设置基本的本地服务器

laravel - Firefox 强制开发域使用 SSL 和 Chrome

javascript - Angular templateUrl 在 https "This request has been blocked; the content must be served over HTTPS."上被阻止

在 http 和 https 上具有自定义绑定(bind)的 WCF