繁体   English   中英

无法在CentOS 7上重新启动apache

[英]Cannot restart apache on CentOS 7

我最近在重新启动Apache时遇到了麻烦。 我最近使用CentOS 7设置了Web服务器。我对php.ini文件进行了一些更改,并认为我需要重新启动apache才能生效。 当我尝试使用systemctl restart httpd.serviceapachectl restart重新启动apache时,出现以下错误消息:

由于控制进程退出并显示错误代码,因此httpd.service的作业失败。 有关详细信息,请参见“ systemctl状态httpd.service”和“ journalctl -xe”。

我输入journalctl -xe并收到:

httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2016-01-25 08:44:29 EST; 10s ago Docs: man:httpd(8) man:apachectl(8) Process: 25244 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 25243 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS) Main PID: 25243 (code=exited, status=0/SUCCESS)

Jan 25 08:44:29 localhost.localdomain systemd[1]: Starting The Apache HTTP Server... Jan 25 08:44:29 localhost.localdomain httpd[25243]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using l... message Jan 25 08:44:29 localhost.localdomain httpd[25243]: httpd (pid 10805) already running Jan 25 08:44:29 localhost.localdomain kill[25244]: kill: cannot find process "" Jan 25 08:44:29 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 Jan 25 08:44:29 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server. Jan 25 08:44:29 localhost.localdomain systemd[1]: Unit httpd.service entered failed state. Jan 25 08:44:29 localhost.localdomain systemd[1]: httpd.service failed. Hint: Some lines were ellipsized, use -l to show in full.

我重新启动服务器,现在apache似乎可以正常运行。

这很可能是您的httpd.conf文件中的配置错误

在conf.d中创建vhost.conf文件后,我遇到了同样的问题。 在删除了这个新创建的文件(包含虚拟主机配置)之后,我可以重新启动httpd而不会出现错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM