apache2.service 的作业失败,因为控制进程退出并出现错误代码。与 node-red 一起启动 apache

apache2.service 的作业失败,因为控制进程退出并出现错误代码。与 node-red 一起启动 apache

我在 (debian 9 64bit) 中遇到 apache 问题。我想安装drupal 比如这篇文章但是当我想启动 apche 时向我显示了这个错误:

mjb@debian:~$ systemctl start apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

我在 apache 之前安装了 NODE-RED。

NODE-RED 使用此地址:localhost:1880

apache 使用端口 80。

该命令的结果systemctl 状态 apache2.service

mjb@debian:~$ systemctl status apache2.service
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2018-05-05 15:28:54 +0430; 37min ago
  Process: 1398 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

该命令的结果日志控制-xe

root@debian:/home/mjb# journalctl -xe
May 05 16:09:01 debian CRON[2339]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; 
May 05 16:09:01 debian CRON[2338]: pam_unix(cron:session): session closed for user root
May 05 16:09:15 debian systemd[1]: Starting Clean php session files...
-- Subject: Unit phpsessionclean.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit phpsessionclean.service has begun starting up.
May 05 16:09:16 debian systemd[1]: Started Clean php session files.
-- Subject: Unit phpsessionclean.service has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit phpsessionclean.service has finished starting up.
-- 
-- The start-up result is done.
May 05 16:09:55 debian systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit apache2.service has begun starting up.
May 05 16:09:55 debian apachectl[2399]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 11 of /etc/apache2/sites-
May 05 16:09:55 debian apachectl[2399]: Action 'start' failed.
May 05 16:09:55 debian apachectl[2399]: The Apache error log may have more information.
May 05 16:09:55 debian systemd[1]: apache2.service: Control process exited, code=exited status=1
May 05 16:09:55 debian systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit apache2.service has failed.
-- 
-- The result is failed.
May 05 16:09:55 debian systemd[1]: apache2.service: Unit entered failed state.
May 05 16:09:55 debian systemd[1]: apache2.service: Failed with result 'exit-code'.

编辑:

在文件中/etc/apache2/sites-enabled/drupal.conf我看到这个:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/drupal
ServerName 192.168.15.189
ServerAlias www.example.com
<<Directory "/var/www/html/drupal/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/drupal-error_log
CustomLog /var/log/apache2/drupal-access_log common
</VirtualHost>

笔记:我使用来自节点红色(localhost:1880 /)

答案1

您一直关注的文章中有一个错误,在线:

<<Directory "/var/www/html/drupal/">

只需删除其中一个起始括号即可<

相关内容