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

Apache 2.4 / SSL certificates error: AH01903: Failed to configure CA certificate chain

· 52CE 我爱测

I recently had to renew one of my SSL certificates on an Apache 2.4/Mod_ssl server. I have 2 Vhosts, no SNI, each running on a separate NIC. Until now the certificates were both Globalsign OrganizationSSL, one specific to an URL,…

问题原文

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

I recently had to renew one of my SSL certificates on an Apache 2.4/Mod_ssl server.

I have 2 Vhosts, no SNI, each running on a separate NIC. Until now the certificates were both Globalsign OrganizationSSL, one specific to an URL, the other one is a wildcard. All this was running fine.

My client wanted to have an Extended Validation SSL. I downloaded the root CA and Intermediate cert required for this chain to operate. But upon switching the certs, my Apache refuses to initialize the chain.

I have the following errors:

  • Apache log: [ssl:emerg] [pid 7394:tid 140377904683136] AH02311: Fatal error initialising mod_ssl, exiting.
  • Vhost log: [ssl:emerg] [pid 7394:tid 140377904683136] AH01903: Failed to configure CA certificate chain!

My Vhost SSL conf:

Vhost 1 (Organization SSL):

SSLEngine on
    SSLProtocol all -SSLv2 -SSLv3
    SSLCipherSuite ALL:!ADH:!EDH:!DHE:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
    SSLHonorCipherOrder     on
    SSLCertificateFile /path/to/organization.crt
    SSLCertificateKeyFile /path/to/server.key
    SSLCertificateChainFile /path/to/intermediate.pem

Vhost 2 (Extended Validation SSL):

SSLEngine on
    SSLProtocol all -SSLv2 -SSLv3
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
    SSLCACertificateFile /path/to/gs_root_ca.crt
    SSLCertificateChainFile /path/to/intermediate.crt
    SSLCertificateFile /path/to/extended_validation.crt
    SSLCertificateKeyFile /path/to/server2.key

I'm no SSL specialist, and I don't understand why Extended Validation and Organization SSL certs cannot cohabit..

I tried to remove one Vhost and the other, it's working perfectly. So I was forced to disable to least used vhost for my main production backoffice to work.

Have you ever encountered such error? Is it a normal behavior? What can I do to have both my sites running again?

Thanks for your expertise!

已采纳解答

原帖链接 · Daniel Ferradal · CC BY-SA 3.0

You are setting it up incorrectly.

Let's recollect:

  • SSLCertificateKeyFile loads the private key (you are doing this fine)
  • SSLCertificateFile loads the server certificate chain. That is the server certificate and its signing CA's sorted from leaf (certificate) to root (higher lvl CA).
  • SSLCertificateChainFile is deprecated in apache 2.4, so remove this one.
  • SSLCACertificateFile loads the CAs for clients that will authenticate through SSL with client certificate. THIS IS THE ONE YOU WANT TO USE FOR SSL CLIENT AUTH then.

Sidenote: Your Ciphersuite seems very incorrect and insecure at first sight. Worth checking for a change in that one too.

Edit based on comments. For 2.4.6 and earlier you should:

  • SSLCertificateFile loads the server certificate.
  • SSLCertificateChainFile loads the server certificate CA chain.
  • SSLCACertificateFile loads the CAs for clients that will authenticate through SSL with client certificate. THIS IS THE ONE YOU WANT TO USE FOR SSL CLIENT AUTH then.

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

资料来源与适用范围

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

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

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