Httpd没有启动没有错误

时间:2017-01-05 12:47:37

标签: apache centos

我有一段时间的错误,我无法弄清楚发生了什么。

当我跑步时:

systemctl start httpd.service

我得到了以下内容:

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

以下是我从systemctl status httpd.service获得的内容:

janv. 05 13:51:14 systemd[1]: Starting The Apache HTTP Server...
janv. 05 13:51:14 httpd[8566]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/virtualhosts/S01_namevirtualhost:2
janv. 05 13:51:17 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
janv. 05 13:51:17 kill[8569]: kill: cannot find process ""
janv. 05 13:51:17 systemd[1]: httpd.service: control process exited, code=exited status=1
janv. 05 13:51:17 systemd[1]: Failed to start The Apache HTTP Server.
janv. 05 13:51:17 systemd[1]: Unit httpd.service entered failed state.
janv. 05 13:51:17 systemd[1]: httpd.service failed.

另外,这是apachtctl configtest的结果:

AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/virtualhosts/S01_namevirtualhost:2
Syntax OK

这是在我尝试续订服务器的SSL证书之后发生的,但是当我放回旧的密钥文件时,我遇到了同样的问题。我可能会遗漏一些东西,但我无法弄清楚是什么。

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

感谢@Dusan Bajic我检查了日志文件......我忘记了。

我在这里发布解决方案,以防有人遇到同样的问题:

/ var / log / httpd / error_log:

[Thu Jan 05 14:50:11.311381 2017] [ssl:emerg] [pid 12726] AH02238: Unable to configure RSA server private key
[Thu Jan 05 14:50:11.311404 2017] [ssl:emerg] [pid 12726] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

通知SSL的密钥无效。我重新创造了它们,现在它们都很好。