第226行的语法错误,但第226行为空

时间:2018-03-15 22:12:59

标签: apache dns webserver

你好吗? :d 我在debian上配置我的Apache webserver。 在一些配置之后我想重启apache并执行: service apache2 reload

然后我收到以下错误: apache2.service的作业失败,因为控制进程退出并显示错误代码。 请参阅" systemctl status apache2.service"和" journalctl -xe"详情。

然后我跑了#34; systemctl status apache2.service"得到了这个:

root@root:/etc/apache2# systemctl status apache2.service
 apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: ena
bled)
   Active: active (running) (Result: exit-code) since Tue 2018-03-13 08:
53:44 EDT; 2 days ago
  Process: 7737 ExecReload=/usr/sbin/apachectl graceful (code=exited, statu
s=1/FAILURE)
  Process: 227 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 269 (apache2)
   CGroup: /system.slice/apache2.service
           ├─269 /usr/sbin/apache2 -k start
           ├─270 /usr/sbin/apache2 -k start
           └─271 /usr/sbin/apache2 -k start

Mar 15 17:43:14 root apachectl[7453]: Action 'graceful' failed.
Mar 15 17:43:14 root apachectl[7453]: The Apache error log may have more info
rmation.
Mar 15 17:43:14 root systemd[1]: apache2.service: Control process exi
ted, code=exited status=1
Mar 15 17:43:14 root systemd[1]: Reload failed for The Apache HTTP Se
rver.
Mar 15 18:04:39 root systemd[1]: Reloading The Apache HTTP Server.
Mar 15 18:04:39 root apachectl[7737]: apache2: Syntax error on line 226 of /e
tc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabl
ed/www.test.ml.conf: No such file or directory
Mar 15 18:04:39 root apachectl[7737]: Action 'graceful' failed.
Mar 15 18:04:39 root apachectl[7737]: The Apache error log may have more info
rmation.
Mar 15 18:04:39 root systemd[1]: apache2.service: Control process exi
ted, code=exited status=1
Mar 15 18:04:39 root systemd[1]: Reload failed for The Apache HTTP Server.

我检查了文件" apache2.conf"在第226行,但意识到这条线是空白的。 Line 226 on cursor 有谁知道这里发生了什么?

我希望这个问题不是愚蠢的。

亲切的问候 匿名

1 个答案:

答案 0 :(得分:0)

apachectl configtest

在这种情况下,

可能很有用