How to configure pem file for nginx?

2019-02-19 04:51发布

I've got 3 files:

  • AddTrustExternalCARoot.crt
  • COMODORSAAddTrustCA.crt
  • COMODORSADomainValidationSecureServerCA.crt

and also a keystore. How can I create a .pem file out of these? I was trying to put its content to a file called .pem, but nginx says

SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

Also those file haven't got any attributes. Only -----BEGIN CERTIFICATE----- , key and -----END CERTIFICATE-----.

标签: ssl nginx
1条回答
祖国的老花朵
2楼-- · 2019-02-19 05:25

You are missing a certificate for your domain. After you get it, concatenate all those files together. This is your file to be used in nginx configuration.

cat yourdomain.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > bundle.crt

Also don't forget to configure path to private key. It is a different file.

查看更多
登录 后发表回答