我们为Network Solutions的网站提供SSL证书。 在将Apache / OpenSSL升级到版本2.4.9之后,现在在启动HTTPD时出现以下警告:
AH02559: The SSLCertificateChainFile directive (/etc/httpd/conf.d/ssl.conf:105) is deprecated, SSLCertificateFile should be used instead
按照mod_ssl的Apache手册,确实如此:
SSLCertificateChainFile已被弃用
当SSLCertificateFile被扩展为也从服务器证书文件加载中间CA证书时,SSLCertificateChainFile在版本2.4.8中变得过时了。
查找SSLCertificateFile的文档,看起来像我只需要用SSLCertificateFilereplace我的调用SSLCertificateChainFile 。
这个改变把我的ssl.conf从这个变成了:
SSLCertificateFile /etc/ssl/STAR.EXAMPLE.COM.crt SSLCertificateKeyFile /etc/ssl/server.key SSLCertificateChainFile /etc/ssl/Apache_Plesk_Install.txt
对此:
SSLCertificateFile /etc/ssl/STAR.EXAMPLE.COM.crt SSLCertificateFile /etc/ssl/Apache_Plesk_Install.txt SSLCertificateKeyFile /etc/ssl/server.key
…但这不起作用。 Apache只是拒绝启动没有任何错误信息。
我不知道还有什么可以尝试的,因为我不熟悉mod_ssl或者SSL证书。 我记得我们需要为Internet Explorer添加Apache_Plesk_Install.txt文件,以便在我们的网站上没有SSL警告,但除此之外 ,我不知道。
任何帮助将不胜感激。 谢谢。
我遇到过同样的问题。 我只是在/etc/apache2/site-enabled/default-ssl.confreplace了这些行
SSLCertificateFile /etc/ssl/certs/domain.crt SSLCertificateKeyFile /etc/ssl/private/domain.key #SSLCertificateChainFile /etc/apache2/ssl.crt/chain.crt
正如你看到的,我只是注释掉了SSLCertificateChainFile 。 然后,看到和你一样的错误,我在domain.crt 的末尾连接了我的chain.crt的内容,如下所示:
root@host~: cat /etc/apache2/ssl.crt/chain.crt >> /etc/ssl/certs/domain.crt
它的function就像一个魅力。
我使用以下脚本来创build一个包含链接证书的证书包。
#!/bin/sh # # Convert PEM Certificate to ca-bundle.crt format # test ! $1 && printf "Usage: `basename $0` certificate" && exit 1 # Friendly Name and Underline Friendly Name with equal signs openssl x509 -in $1 -text -noout | sed -e 's/^ *Subject:.*CN=\([^,]*\).*/\1/p;tc' -e 'd;:c' -e 's/./=/g' # Output Fingerprint and swap = for : openssl x509 -in $1 -noout -fingerprint | sed -e 's/=/: /' # Output PEM Data: echo 'PEM Data:' # Output Certificate openssl x509 -in $1 # Output Certificate text swapping Certificate with Certificate Ingredients openssl x509 -in $1 -text -noout | sed -e 's/^Certificate:/Certificate Ingredients:/'
要使用它,从服务器证书开始,依次通过证书链中的任何中间证书回到根证书。
./bundle.sh myserver.crt >myserver.chain ./bundle.sh intermediate.crt >>myserver.chain ./bundle.sh root.crt >>myserver.chain
其中相应的证书名称将replace为您的真实证书名称。
在SSLCertificateFile指令指定的文件和SSLCertificateKeyFile指定的文件中连接的私钥都有站点证书和中间件,并且您应该被全部设置。 尽pipe您可以将私钥与证书保存在同一个文件中,但不鼓励。 请查看文档以获取更多详细信息:
http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatefile
我build议根CA证书不是SSLCertificateFile的一部分,因为客户端应该拥有可信的根CA证书,以便证书validation按devise工作。
另外,如果在apache错误日志中没有任何东西,那么可以把错误日志的细粒度放在http://httpd.apache.org/docs/current/mod/core.html#loglevel