Apache2 启动失败,无法启动 LSB

Apache2 启动失败,无法启动 LSB

当我使用 Laravel 时,phpMyAdmin 无法工作,并且我得到了error 2002

我重新安装了所有内容(apache2phpphpmyadmin),但出现问题apache2,它无法再启动。

错误如下:

    ● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Fri 2017-07-07 03:11:31 EET; 6ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4035 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jul 07 03:11:31 Alex apache2[4035]:  *
Jul 07 03:11:31 Alex apache2[4035]:  * The apache2 configtest failed.
Jul 07 03:11:31 Alex apache2[4035]: Output of config test was:
Jul 07 03:11:31 Alex apache2[4035]: apache2: Syntax error on line 140 of /e...ry
Jul 07 03:11:31 Alex apache2[4035]: Action 'configtest' failed.
Jul 07 03:11:31 Alex apache2[4035]: The Apache error log may have more info...n.
Jul 07 03:11:31 Alex systemd[1]: apache2.service: Control process exited, c...=1
Jul 07 03:11:31 Alex systemd[1]: Failed to start LSB: Apache2 web server.
Jul 07 03:11:31 Alex systemd[1]: apache2.service: Unit entered failed state.
Jul 07 03:11:31 Alex systemd[1]: apache2.service: Failed with result 'exit-...'.
Hint: Some lines were ellipsized, use -l to show in full.

答案1

您的 .conf 文件第 140 行存在语法错误。

这就是错误告诉你的。

-l如果您使用该消息最后一行列出的内容,您就可以看到它是哪个 .conf 文件。

systemctl status apache2.service -l

相关内容