为SERVERconfiguration的RSA证书不包含与服务器名称匹配的ID

我最近启动了一个LAMP服务器(所有最新版本)w / WordPress上,我试图安装我最近购买的SSL证书。 当我重新启动apachectl ,error_log给我这个:

 [Tue Feb 25 01:07:14.744222 2014] [mpm_prefork:notice] [pid 1744] AH00169: caught SIGTERM, shutting down [Tue Feb 25 01:07:17.135704 2014] [suexec:notice] [pid 1765] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Tue Feb 25 01:07:17.217424 2014] [auth_digest:notice] [pid 1766] AH01757: generating secret for digest authentication ... [Tue Feb 25 01:07:17.218686 2014] [lbmethod_heartbeat:notice] [pid 1766] AH02282: No slotmem from mod_heartmonitor PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.5/modules/mysql.so' - /usr/lib64/php/5.5/modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.5/modules/mysqli.so' - /usr/lib64/php/5.5/modules/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0 [Tue Feb 25 01:07:17.305292 2014] [mpm_prefork:notice] [pid 1766] AH00163: Apache/2.4.6 (Amazon) OpenSSL/1.0.1e-fips PHP/5.5.7 configured -- resuming normal operations [Tue Feb 25 01:07:17.305378 2014] [core:notice] [pid 1766] AH00094: Command line: '/usr/sbin/httpd' 

虽然ssl_error_log给了我这个:

 [Tue Feb 25 00:57:15.802287 2014] [ssl:warn] [pid 1705] AH01909: RSA certificate configured for ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com:443 does NOT include an ID which matches the server name [Tue Feb 25 00:57:15.899327 2014] [ssl:warn] [pid 1706] AH01909: RSA certificate configured for ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com:443 does NOT include an ID which matches the server name 

我将ssl.conf “ServerName”更改为我的服务器名称(dcturano.com)并重新启动了apachectl ,但是却发生了此错误。 任何想法为什么?

顺便说一下,我没有设置服务器的CommonName,这可能是问题吗?

 openssl x509 -in server.crt -noout -subject 

应该返回证书的CN。 这是你必须在ServerName指令中使用并连接到的名称。

我有同样的问题,但这是因为另一个原因。 我发布在这里为未来的谷歌search:

在我的apache2configuration文件,而不是有<VirtualHost *:443> ,我有<VirtualHost *:80> 。 只要我修好了,网站就恢复正常运行了。

另外,如果像我一样,你甚至不使用ssl,你仍然会得到这个错误消息,因为使用ssl默认是打开的。 在这种情况下,把它关掉! 以下是config.d/ssl.conf的摘录:

 # SSL Engine Switch: # Enable/Disable SSL for this virtual host. #SSLEngine on SSLEngine off 

我有相同的AH01909:RSA证书错误。 在我的情况下,我有正确的serverName值。

错误原因是安全站点<VirtualHost 10.11.12.13:443>定义中的IP地址不正确。 我错过了打字!

请确保您的ServerName与openssl x509 -in server.crt -noout -subject输出openssl x509 -in server.crt -noout -subject 。 如果有www,ServerName也需要一个。 如果没有,ServerName必须删除www。