【问题标题】:Run same site with two different ssl ports on iis在 iis 上使用两个不同的 ssl 端口运行同一个站点
【发布时间】:2017-12-03 23:43:33
【问题描述】:

我的网站https://www.MyWebSite.com 在端口 433 上运行。但我也有一个管理员登录名,只能从办公室本地网络http://MyServer:9999/Login.aspx 获得。两个地址都指向同一个站点,但绑定不同。

是否可以让端口 9999 上的那个使用 https?我尝试在 IIS 中创建自签名证书,但我的浏览器仍然报错,即使我导出了证书并将其存储在我的 CA 受信任的根目录中。

所以总结一下:

我的常规网站:https://MyWebSite.com

我的管理员登录,只能通过本地网络访问:http://MyServer:9999/Login.aspx 工作正常。

当添加颁发给“MyServer”(不是 MyWebSite)的自签名证书并在端口 9999 上添加新绑定时,我虽然向网站但 Chrome 给了我一个警告 NET::ERR_CERT_COMMON_NAME_INVALID,即使证书颁发给 @987654326 @并且值得信赖

【问题讨论】:

    标签: ssl iis https


    【解决方案1】:

    是否可以让9999端口的那个使用https?

    是的,可以使用自签名设置另一个端口 证书。

    通常自签名证书将具有完全限定的机器名称

    e.g. machinename.subdomain.domain so you have to browse using https://machinename.subdomain.domain:9999/

    请仔细检查您遇到了什么错误,在 chrome 中

    Your connection is not private
    
    Attackers might be trying to steal your information from in08706523d (for example, passwords, messages, or credit cards). NET::ERR_CERT_COMMON_NAME_INVALID
    

    在IE中,你可能会得到

     There is a problem with this website’s security certificate.
    
    The security certificate presented by this website was issued for a different website's address.
    
    Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.
    

    在这种情况下,假设您在 IIS 绑定中将主机名指定为 *,并且还安装了自签名证书 installed 您的“根证书颁发机构”,您应该能够浏览到
    https://machinename.subdomain.domain:9999/ 没有任何问题

    【讨论】:

    • 当使用 MyServer 的自签名证书并浏览到 https://MyServer:8888/Login.aspx 时,我在 IE 中没有收到警告,但在 Firefox 中却显示为 "Your connection is not secure because the certificate is selfsigned"。在 Chrome 中,我访问了网站,但 https 是红色的(不安全)。
    • 正如我所说,您必须使用机器的完全限定域名。例如MyServer.eur.corp.companyname:8888/Login.aspx。 MyServer 是我的机器名称。 Firefox有单独的CA store,它不检查机器的证书存储。所以你必须将它安装到firefox CA store。
    • 所以仅使用MyServer:8000 是不可能的?
    • 这是可能的,但自签名证书应该作为“MyServer”颁发。这不是 IIS 的问题,而是 SSL 的工作方式。每个浏览器都会检查证书中的颁发给字段与您使用的主机名是否完全匹配。您应该创建一个 slefsigned 证书,并将颁发给作为 MyServer 。检查此SO post
    • 但是自签名证书是发给“MyServer”的,它在我的电脑(客户端)上是受信任的
    猜你喜欢
    • 2017-05-09
    • 1970-01-01
    • 2020-09-24
    • 2015-01-18
    • 1970-01-01
    • 1970-01-01
    • 2023-04-10
    • 1970-01-01
    • 2019-01-21
    相关资源
    最近更新 更多