【问题标题】:Apache/HTTPD service not workingApache/HTTPD 服务不工作
【发布时间】:2017-12-01 02:13:38
【问题描述】:

我正在尝试在我的 CentOS 7.3-1611 专用服务器上启动我的 Apache/HTTPD。

当我启动服务时,我收到以下错误代码:

[root@ns3033129 ~]# service httpd start
Redirecting to /bin/systemctl start  httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@ns3033129 ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2017-06-27 23:14:39 CEST; 9s ago
  Process: 18137 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 18134 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 18134 (code=exited, status=1/FAILURE)

Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: Starting The Apache HTTP Server...
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu httpd[18134]: [Tue Jun 27 23:14:39.351580 2017] [so:warn] [pid 18134] AH01574: module ruid2_module is already loaded, skipping
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu httpd[18134]: httpd: Syntax error on line 58 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf.d/vesta.conf: Could not open configuration file /home/admi...le or directory
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu kill[18137]: kill: cannot find process ""
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: Failed to start The Apache HTTP Server.
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: Unit httpd.service entered failed state.
Jun 27 23:14:39 ns3033129.ip-149-202-89.eu systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

【问题讨论】:

  • Stack Overflow 是一个编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参阅帮助中心的What topics can I ask about here。也许Super User 或Unix & Linux Stack Exchange 会是一个更好的提问地点。
  • @jww 开发软件的安装和配置被明确认为是主题。
  • 好吧,那么您自己发布的错误消息几乎说明了一切,不是吗? “/etc/httpd/conf/httpd 的第 58 行出现语法错误.....”在查看向您指出的那些行时,您看到了什么?
  • “开发软件的安装和配置被明确视为主题...” - 您所做的只是提供失败服务的 Apache 日志。请显示您的失败代码。
  • 我无法运行命令 service httpd start。

标签: linux apache centos


【解决方案1】:

systemctl status httpd 的输出清楚的说是你vesta.conf中的配置错误。

Jun 27 23:14:39 ns3033129.ip-149-202-89.eu httpd[18134]: httpd: Syntax error on line 58 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf.d/vesta.conf: Could not open configuration file /home/admi...le or directory

在启动 httpd 服务器之前运行“httpd -t”来检查你的 httpd 配置。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-03-21
    • 2019-05-09
    • 1970-01-01
    • 1970-01-01
    • 2016-01-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多