【问题标题】:HTTPS issue "Your connection is not private", NgnixHTTPS 问题“您的连接不是私有的”,Nginx
【发布时间】:2016-05-25 06:41:34
【问题描述】:

我正在尝试使用“Nginx”在所有子域上进行 HTTPS 工作,但收到:

This server could not prove that it is api.wokcraft.com; its security certificate is not trusted by your computer's operating system. This may be caused by a misconfiguration or an attacker intercepting your connection.

网址:https://api.wokcraft.com/

谁能告知遗漏了什么? 谢谢

编辑:我按照以下说明操作:https://support.comodo.com/index.php?/Default/Knowledgebase/Article/View/1091/0/certificate-installation--nginx

【问题讨论】:

    标签: ssl nginx https ssl-certificate


    【解决方案1】:

    Nginx 没有发送正确的中间证书列表:https://www.ssllabs.com/ssltest/analyze.html?d=api.wokcraft.com&latest

    【讨论】:

    • 我合并了“Ngnix CRT”和“SSL bundle”,接下来我应该做什么?
    【解决方案2】:
    1. 创建正确的包:

    您想以这种方式创建 Comodo Bundle(将 your_cert 替换为您的文件的实际名称):

    cat your_cert.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > your_cert.ca-bundle
    
    1. 将新的 ca-bundle 下载到您的服务器上

    完成后将其复制到您的服务器,就像在 Nginx 中那样设置它:

    ssl_certificate /your/ssl/path/your_cert.ca-bundle;
    ssl_certificate_key /your/ssl/path/your_cert_privateKey.key;
    
    1. 在复制后验证证书和密钥是否匹配(比较 md5 哈希)。

      openssl x509 -noout -modulus -in certificate.crt | openssl md5

      openssl rsa -noout -modulus -in privateKey.key | openssl md5

    2. 测试配置(需要以 sudo 运行):

      sudo nginx -t

    3. 如果没有错误,重新加载 nginx 并重新运行 SSLlabs 检查:

      https://www.ssllabs.com/ssltest/analyze.html?d=api.wokcraft.com

    【讨论】:

    • 运行:sudo cat wokcraft.api.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > wokcraft.api.ca-bundle(-bash: wokcraft.api.ca-bundle: Permission denied)
    • 我不确定run: 是什么,您是否将其作为某些脚本的一部分运行?它是否具有访问文件的正确权限?在最坏的情况下,只要顺序相同,您就可以手动打开文件并复制粘贴。 虽然这很容易搞砸。所以我建议不要这样做,除非一切都失败了。
    猜你喜欢
    • 2019-03-23
    • 1970-01-01
    • 2022-06-10
    • 2017-10-19
    • 1970-01-01
    • 2018-07-03
    • 2017-10-15
    • 1970-01-01
    • 2015-04-01
    相关资源
    最近更新 更多