无法通过通用名称访问服务器

Cant able to access server by its common name

我在具有以下字段的 apache 服务器上安装了一个服务器证书

1) 通用名称:192.168.0.107

2) 主题备用名称: IP:192.168.0.108,IP:192.168.0.109

当浏览器访问任何主题备用名称时,浏览器显示绿色挂锁(安全连接),但当我尝试通过其通用名称访问服务器时,浏览器显示(不安全连接)。为什么会这样?我的证书有什么问题吗?请帮我解决这个问题

注意:我已经在浏览器上安装了根证书

自从 2000 年引入基于 TLS 的 HTTP 并由 RFC2818 定义以来,commonName 字段的使用已被视为已弃用,如果存在 SubjectAlternativeName,则必须使用它。

If a subjectAltName extension of type dNSName is present, that MUSTbe used as the identity. Otherwise, the (most specific) Common Name field in the Subject field of the certificate MUST be used. Although the use of the Common Name is existing practice, it is deprecated and Certification Authorities are encouraged to use the dNSName instead.

目前大多数浏览器都需要 SAN 扩展,甚至不接受只有 CN 的证书。参见 https://security.stackexchange.com/questions/172626/chrome-requires-san-names-in-certificate-when-will-other-browsers-ie-follow