【问题标题】:SSL: Certificate does not match the name (Cloudflare)SSL:证书与名称不匹配 (Cloudflare)
【发布时间】:2017-06-23 13:18:34
【问题描述】:

我将这个 docker 和这个配置一起运行,以使用 cloudfare 作为 CDN 来获得更好的对等互连,主要用于 Plex 流式传输。

https://hub.docker.com/r/linuxserver/letsencrypt/

https://github.com/toomuchio/plex-nginx-reverseproxy

一切正常,直到昨天 Chrome 开始出现此错误:

NET::ERR_CERT_COMMON_NAME_INVALID
Subject: sni220824.cloudflaressl.com
Issuer: COMODO ECC Domain Validation Secure Server CA 2

digicert.com 说:

Common Name = sni220824.cloudflaressl.com
Subject Alternative Names = sni220824.cloudflaressl.com, *.aomenlanguifangyuleguibinting.com, *.attractivestrangers.com, *.avrost.cf, *.batrot.tk, *.bytes-os.com, *.cockheyt.nl, *.everythingfixixf.cf, *.fixkitty.tk, *.fixparties.gq, *.glenniest.com, *.hdwallpaperxd.com, *.ipricecat.press, *.planerost.cf, *.pmudlead.cf, *.protoncleaning.com.au, *.resnl.nl, *.rostspy.tk, *.rotplane.ga, *.shopzero.xyz, *.skillreview.com, *.uncuriosolugar.com, aomenlanguifangyuleguibinting.com, attractivestrangers.com, avrost.cf, batrot.tk, bytes-os.com, cockheyt.nl, everythingfixixf.cf, fixkitty.tk, fixparties.gq, glenniest.com, hdwallpaperxd.com, ipricecat.press, planerost.cf, pmudlead.cf, protoncleaning.com.au, resnl.nl, rostspy.tk, rotplane.ga, shopzero.xyz, skillreview.com, uncuriosolugar.com
Issuer = COMODO ECC Domain Validation Secure Server CA 2
Serial Number = 5B8918EF9DBF934021332123CC361CAF
SHA1 Thumbprint = 366A770128B3BD5ACEA675AB1D945DB8365DFDDA
Key Length = 256
Signature algorithm = SHA256 + ECC (excellent)
Secure Renegotiation: Supported
...

Certificate does not match name mydomain.org

docker 控制台中的“certbot 证书”给了我:

root@b03e5d07fcdb:/$ certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Found the following certs:
  Certificate Name: mydomain.org
    Domains: mydomain.org plex.mydomain.org www.mydomain.org
    Expiry Date: 2017-09-21 00:07:00+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/mydomain.org/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/mydomain.org/privkey.pem
-------------------------------------------------------------------------------

Cloudflare SSL 已设置为 Full,现在我已将其设置为 Full (Strict)。

我是这种事情的新手,所以我有点迷茫,我的 google-fu 也没有帮助。

编辑:Aaand 一切都恢复正常。为什么?我不知道。

我的域在 digicert 上列出,所有反向代理和 plex.mydomain.org 都可以正常工作。

【问题讨论】:

  • 你在chrome的地址栏中输入了什么?
  • @JamesKPolk https://plex.mydomain.org https://mydomain.org/plexpy https://mydomain.org/sonarr 以及我已经设置的所有其他反向代理正在工作。
  • mydomain.org 与主题备用名称列表中的 any 域名不匹配,因此 chrome 在返回错误时做了正确的事情。
  • 是的,哈哈。我不明白的是为什么。

标签: ssl nginx ssl-certificate reverse-proxy cloudflare


【解决方案1】:

这通常发生在为一个域而不是网站的整个协议设置 SSL 证书时。例如,您激活了 SSL,例如 example.com,而不是 www.example.com,将会出现错误,我建议您联系您的主机,将没有 SSL 的 URL 重定向到有 SSL 的 URL。另一种方法是为您的域 www 或非 www 的所有协议购买 SSL 证书。

【讨论】:

  • 但我为 mydomain.org、plex.mydomain.org 和 www.mydomain.org 使用了letsencrypt。它不应该工作吗?
【解决方案2】:

Aaand 一切都恢复正常。为什么?我不知道。昨晚试了很多东西,最后还是放弃了。

我的域在 digicert 上列出,所有反向代理和 plex.mydomain.org 都可以正常工作。

【讨论】: