我有StartSSL免费证书的nginx服务器,即将过期。我想再续一次。
openssl req -new -sha256 -nodes -days 365 -newkey rsa:2048 -keyout ssl.key -out ssl.csr
输入生成证书所需的信息。我把这个CSR粘贴到网站上,并在主域上成功地获得了域和子域的签名证书。
加载证书服务器后,输出此错误:
feb 05 17:46:19 systemd[1]: Unit nginx.service entered failed state.
feb 05 17:47:13 nginx[4514]: nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/nginx/ssl/nginx.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
feb 05 17:47:13 nginx[4514]: nginx: configuration file /etc/nginx/nginx.conf test failed
feb 05 17:47:13 systemd[1]: nginx.service: control process exited, code=exited status=1
feb 05 17:47:13 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
我用以下命令测试了模数:
openssl x509 -noout -modulus -in nginx.crt | openssl md5
openssl rsa -noout -modulus -in nginx.key | openssl md5
openssl req -noout -modulus -in ssl.csr | openssl md5
而且他们匹配。
StartSSL提供包含中间证书的证书包。我发现,如果它们的顺序不正确,就会失败,所以我试着把它们作为第一证书,但没有成功。
编辑:我尝试用nginx1.9.3在另一台服务器上使用密钥和证书,它正在工作。所以证书是可以的,但是服务器不是。
发布于 2017-10-24 05:46:03
创建包时,请检查证书序列。它应按以下顺序进行:
这可能是错误背后的原因。
https://stackoverflow.com/questions/35242943
复制相似问题