httpd 启动失败并显示错误

httpd 启动失败并显示错误

我通过yum install httpdFedora 安装了 Apache。当我尝试启动该服务时,它显示以下错误:

[root@localhost ~]# systemctl enable httpd.service 
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' 

[root@localhost ~]# systemctl start httpd.service 
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.



[root@localhost ~]# systemctl status httpd.service 
httpd.service - The Apache HTTP Server 

   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled) 
   Active: failed (Result: exit-code) since Sat 2014-05-17 21:19:25 IST; 1h 13min ago 
  Process: 2622 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=1/FAILURE) 

  Process: 2620 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) 


May 17 21:19:25 localhost.localdomain systemd[1]: Starting The Apache HTTP Se... 
May 17 21:19:25 localhost.localdomain httpd[2620]: httpd: Syntax error on lin... 
May 17 21:19:25 localhost.localdomain systemd[1]: httpd.service: main process... 
May 17 21:19:25 localhost.localdomain httpd[2622]: httpd: Syntax error on lin... 
May 17 21:19:25 localhost.localdomain systemd[1]: httpd.service: control proc... 
May 17 21:19:25 localhost.localdomain systemd[1]: Failed to start The Apache ... 
May 17 21:19:25 localhost.localdomain systemd[1]: Unit httpd.service entered ... 
[root@localhost ~]# 

答案1

显然Apache的配置文件有语法错误。

相关内容