我有域名,证书和nginx。 3档
private.key
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
domain.crt
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
PKCS.key
-----BEGIN PKCS7-----
-----END PKCS7-----
我编辑/ etc / nginx / sites-available / default file
ssl_certificate /root/domain.crt;
ssl_certificate_key /root/private.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
但重新加载nginx时收到消息
nginx: [emerg] SSL_CTX_use_PrivateKey_file("/root/private.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
我如何解决它,我做错了什么?