我遇到了一个问题,将带有私钥的商业证书导入我的 bitdefender Gravityzone 控制台后,它停止工作。我遇到了这样的错误:
serv bdadmin # service nginx start
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
serv bdadmin # systemctl status nginx
● nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-03-17 16:41:48 UTC; 4s ago
Docs: http://nginx.org/en/docs/
Process: 26814 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
Mar 17 16:41:48 serv systemd[1]: Starting nginx - high performance web server...
Mar 17 16:41:48 serv nginx[26814]: nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/hydra-incidents-ssl.conf:7
Mar 17 16:41:48 serv nginx[26814]: nginx: [emerg] SSL_CTX_use_PrivateKey("/opt/bitdefender/certs/hydra.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
Mar 17 16:41:48 serv systemd[1]: nginx.service: Control process exited, code=exited status=1
Mar 17 16:41:48 serv systemd[1]: Failed to start nginx - high performance web server.
Mar 17 16:41:48 serv systemd[1]: nginx.service: Unit entered failed state.
Mar 17 16:41:48 serv systemd[1]: nginx.service: Failed with result 'exit-code'.
有没有办法让 Web 控制台即使在旧的自签名证书上也能正常工作?有人能帮助我吗?
答案1
您安装的证书和私钥文件不匹配。请确保这两个文件使用相同的来源。