大网数据广告活动
服务器运维问答

Apache SSL error: Private key not found

· 52CE 我爱测

I'm running apache on Ubuntu 14.04 and trying to implement SSL. Any help would be greatly appreciated. default-ssl.conf has: SSLCertificateFile /etc/apache2/ssl/domain.crt SSLCertificateKeyFile /etc/apache2/ssl/domain.csr When I …

问题原文

原帖链接 · mikesynan · CC BY-SA 3.0

I'm running apache on Ubuntu 14.04 and trying to implement SSL. Any help would be greatly appreciated.

default-ssl.conf has:

SSLCertificateFile      /etc/apache2/ssl/domain.crt 
SSLCertificateKeyFile   /etc/apache2/ssl/domain.csr

When I restart apache, the Error message in /var/log/apache2/error.log is:

[Sun Feb 01 19:31:06.443226 2015] [ssl:error] [pid 30927] AH02203: Init: Private key not found
[Sun Feb 01 19:31:06.443408 2015] [ssl:error] [pid 30927] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Sun Feb 01 19:31:06.443424 2015] [ssl:error] [pid 30927] SSL Library Error: error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 er$
[Sun Feb 01 19:31:06.443435 2015] [ssl:error] [pid 30927] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Sun Feb 01 19:31:06.443447 2015] [ssl:error] [pid 30927] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Ty$
[Sun Feb 01 19:31:06.443458 2015] [ssl:error] [pid 30927] SSL Library Error: error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib
[Sun Feb 01 19:31:06.443468 2015] [ssl:error] [pid 30927] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Sun Feb 01 19:31:06.443479 2015] [ssl:error] [pid 30927] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Ty$
[Sun Feb 01 19:31:06.443487 2015] [ssl:emerg] [pid 30927] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more inf$

已采纳解答

原帖链接 · Mircea Vutcovici · CC BY-SA 3.0

WARNING: Do not ever post your private key on internet. Do not even copy it to another computer, workstation etc. It must be kept as private as possible.

SSLCertificateKeyFile requires a Private Key. This key is usually generated before CSR or at the same time. Search for a file that starts with a line containing: BEGIN PRIVATE KEY

CSR (certificate signing request) is required only when you ask to sign the certificate. After that you can discard it.

If you lost the Private Key you will need to generate a new Private Key, then generate a new CSR and ask the CA (certificate authority) to sign the CSR again.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-02-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。