Nginx SSL证书失败SSL:错误:0B080074:x509(谷歌云)
我的服务器托管在Bluehost(Apache)中,证书工作正常。现在,我正在使用googlecloud在不同端口的NodeJS中使用Nginx SSL证书失败SSL:错误:0B080074:x509(谷歌云),ssl,nginx,google-compute-engine,reverse-proxy,google-cloud-platform,Ssl,Nginx,Google Compute Engine,Reverse Proxy,Google Cloud Platform,我的服务器托管在Bluehost(Apache)中,证书工作正常。现在,我正在使用googlecloud在不同端口的NodeJS中使用proxy\u-pass对多个页面进行搜索。我正在尝试配置SSL,但遇到问题。我一直在寻找类似的问题,但它仍然显示出相同的错误。我在下面创建了密钥文件 /var/log/nginx/error.log: Modulus=B1E3B0A.......512 characters in total......AFC79424BE139 2015/07/08 10:4
proxy\u-pass
对多个页面进行搜索。我正在尝试配置SSL,但遇到问题。我一直在寻找类似的问题,但它仍然显示出相同的错误。我在下面创建了密钥文件
/var/log/nginx/error.log:
Modulus=B1E3B0A.......512 characters in total......AFC79424BE139
2015/07/08 10:47:20[emerg]2950#0:SL_CTX_use_PrivateKey_文件(“/etc/nginx/ssl/domain_com/domain_com.key”)失败(ssl:错误:0B080074:x509证书例程:x509检查_private_key:密钥值不匹配)
当我打开控制台时:
openssl rsa-noout-module-in-domain\u com.key向我展示了以下内容:
Modulus=D484DD1......512 characters in total......5A8F3DEF999005F
openssl x509-noout-modules-在ssl捆绑包中。crt:
Modulus=B1E3B0A.......512 characters in total......AFC79424BE139
这是我的Nginx设置:
server {
listen 443;
server_name www.domain.com;
ssl_certificate /etc/nginx/ssl/domain_com/ssl-bundle.crt;
ssl_certificate_key /etc/nginx/ssl/domain_com/domain_com.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/domain_com.access.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8086;
proxy_read_timeout 90;
proxy_redirect http://localhost:8086 https://www.domain.com;
}
}
如果连接顺序错误,则可能会出现问题。你试过:
cat www_example_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ssl-bundle.crt
这看起来是正确的,但连接通常需要消除根CA的额外下载,因此Nginx创建者:
浏览器通常存储它们收到的中间证书
并且是由受信任的权威机构签署的,因此被积极使用的浏览器
可能已经拥有所需的中级证书,但可能没有
投诉未使用链接包发送的证书
明确表示:
如果服务器证书和捆绑包已连接到
如果顺序错误,nginx将无法启动并显示错误
信息:
SSL_CTX_use_PrivateKey_file(" ... /www.example.com.key") failed
(SSL: error:0B080074:x509 certificate routines:
X509_check_private_key:key values mismatch)
因为nginx尝试将私钥用于捆绑包的第一个密钥
证书,而不是服务器证书
因此,要解决此问题,请尝试:
@好的,我们今天就把它整理一下。我很感激你的回答,你说的“附加”是什么意思?。我是Ubuntu和服务器配置的新手,请验证问题的编辑。原谅我english@wZVanGssl_certificate/etc/nginx/ssl/dragonbundaimbot_com/www_example_com.crt;是的,我知道,我知道你会说路径,但那是存在的。@wZVanG sslcerts目录中最后两个之一