Apache 虚拟主机服务器重新启动时出错

Apache 虚拟主机服务器重新启动时出错

我将通过 PuTTy 上的 root 用户登录我的服务器并在其上安装 LAMP。安装灯后,打开森托斯7我将成功创建 Apache 虚拟主机,但最后当我尝试重新启动 Apache 时,它​​显示错误。如何解决这个问题?

systemctl status httpd.service

**Error=>>>>>>>**

● httpd.service - The Apache HTTP Server

Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)

Active: failed (Result: exit-code) since Thu 2017-08-24 11:38:04 EDT; 10s ago

Docs: man:httpd(8)

        man:apachectl(8)

Process: 7029 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, 

status=1/FAILURE)

  Process: 7028 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, 

status=1/FAILURE)

 Main PID: 7028 (code=exited, status=1/FAILURE)

Aug 24 11:38:04 example.com systemd[1]: Starting The Apache HTTP Server...

Aug 24 11:38:04 example.com systemd[1]: httpd.service: main process exite...E

Aug 24 11:38:04 example.com kill[7029]: kill: cannot find process ""

Aug 24 11:38:04 example.com systemd[1]: httpd.service: control process ex...1

Aug 24 11:38:04 example.com systemd[1]: Failed to start The Apache HTTP S....

Aug 24 11:38:04 example.com systemd[1]: Unit httpd.service entered failed....

Aug 24 11:38:04 example.com systemd[1]: httpd.service failed.

Hint: Some lines were ellipsized, use -l to show in full.

答案1

始终从故障排除工作开始。

此命令将显示导致错误的原因:

在带有 Apache 的 CentOS 上,请使用

apachectl -t

在带有 Apache2 的 Ubuntu 上,请使用

apache2ctl -t

通常这可能是一个非常小的错误,修复错误,重新启动 apache Web 服务器并享受。

快乐编码。

相关内容