我目前正在尝试通过Comodo安装通过Namecheap发布的SSL证书。 我目前有问题。 在错误日志中,我有这个错误:
[Sun Apr 10 17:59:06.567045 2016] [mpm_prefork:notice] [pid 613] AH00169: caught SIGTERM, shutting down [Sun Apr 10 17:59:07.662580 2016] [ssl:emerg] [pid 28664] AH02572: Failed to configure at least one certificate and key for my-domain.com:443 [Sun Apr 10 17:59:07.662679 2016] [ssl:emerg] [pid 28664] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned [Sun Apr 10 17:59:07.662690 2016] [ssl:emerg] [pid 28664] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information AH00016: Configuration Failed
我从Namecheap得到的文件如下:
我生成一个server.key文件以及一个server.csr文件。
我的apacheconfiguration如下:
<IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin webmaster@localhost ServerName my-domain.com DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the # concatenation of PEM encoded CA certificates which form the # certificate chain for the server certificate. Alternatively # the referenced file can be the same as SSLCertificateFile # when the CA certificates are directly appended to the server # certificate for convinience. SSLCertificateChainFile /etc/apache2/ssl.crt/minecraft-multiplayer_com.crt SSLCertificateKeyFile /etc/apache2/ssl.crt/server.key SSLCACertificateFile /etc/apache2/ssl.crt/minecraft-multiplayer_com.ca-bundle <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 # MSIE 7 and newer should be able to use keepalive BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown </VirtualHost> </IfModule> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
我用a2enmod ssl在apache上设置了SSL。 我不太熟悉与Apache设置证书,所以你可以提供任何帮助表示赞赏。
您错过了服务器证书,另一方面复制了一些文件。 我将使用下面的假设minecraft-multiplayer_com.ca-bundle包含从服务器证书到根CA的证书链
SSLCertificateFile /etc/apache2/ssl.crt/minecraft-multiplayer_com.crt SSLCertificateKeyFile /etc/apache2/ssl.crt/server.key SSLCertificateChainFile /etc/apache2/ssl.crt/minecraft-multiplayer_com.ca-bundle
在日志中只有相同的错误,经过长时间的debugging和validation,这在SSLProtocol语句中是一个愚蠢的错误。 我不小心添加了-SSLv2 ,这是没有道理的,但是日志中的错误也是如此。 删除后,一切工作正常。