如何为Nginx配置Pem文件? [英] How to configure pem file for nginx?

查看:1749
本文介绍了如何为Nginx配置Pem文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3个文件:

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

以及密钥库.如何从这些文件中创建一个.pem文件?我试图将其内容放入名为.pem的文件中,但nginx说

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:错误:0B080074:x509证书 例程:X509_check_private_key:密钥值不匹配

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

这些文件也没有任何属性.仅-----BEGIN CERTIFICATE-----,键和-----END CERTIFICATE-----.

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

推荐答案

您缺少域的证书.获取后,将所有这些文件连接在一起.这是您要在nginx配置中使用的文件.

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.

这篇关于如何为Nginx配置Pem文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆