【问题标题】:How to solve error restarting apache Ubuntu如何解决重启 apache Ubuntu 的错误
【发布时间】:2019-10-17 16:59:53
【问题描述】:

问题来自posted in Spanish, on es.stackoverflow.com,来自mnsperez97

重新启动后,我与 Apache 的连接出现问题 使用sudo service apache2 restart 命令,我收到此错误

apache2.service 的作业失败,因为控制进程退出 错误代码。请参阅“systemctl status apache2.service”和“journalctl -xe" 了解详情。

然后当输入 localhost 时它不让我进去,它让我 更糟糕的是,当我运行sudo journalctl -xe 时,他告诉我以下内容,但是 我仍然没有找到错误,如果你能帮助我,我会非常 感激不尽

编辑:运行systemctl status apache2.service 命令和这个 在我看来

apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Thu 2019-10-17 12:20:34 -04; 29min ago
  Process: 21198 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
  Process: 7385 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 23453 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
 Main PID: 1059 (code=exited, status=0/SUCCESS)

oct 17 12:20:34 pcarrasco systemd[1]: Starting The Apache HTTP Server...
oct 17 12:20:34 pcarrasco apachectl[23453]: AH00526: Syntax error on line 47 of /etc/apache2/sites-enabled/cms.local.conf:
oct 17 12:20:34 pcarrasco apachectl[23453]: order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure'
oct 17 12:20:34 pcarrasco apachectl[23453]: Action 'start' failed.
oct 17 12:20:34 pcarrasco apachectl[23453]: The Apache error log may have more information.
oct 17 12:20:34 pcarrasco systemd[1]: apache2.service: Control process exited, code=exited status=1
oct 17 12:20:34 pcarrasco systemd[1]: apache2.service: Failed with result 'exit-code'.
oct 17 12:20:34 pcarrasco systemd[1]: Failed to start The Apache HTTP Server.

【问题讨论】:

    标签: apache ubuntu


    【解决方案1】:

    由于您的配置问题,这很常见

    可能是端口配置

    锁定log file(可以在 /etc/httpd/conf/httpd.conf 中作为 ErrorLog 找到密码)

    或尝试撤消您在配置文件中所做的更改,直到找到问题为止

    【讨论】:

    • 搜索路由,我不使用ubuntu 18.09,当我使用命令sudo nano /etc/httpd/conf/httpd.conf它告诉我路由不存在
    • 如果你只使用 apache 你会在/etc/apache2/sites-available/*.conf/找到它
    • 如果你正在运行lampp/xampp堆栈,那么它通常是/opt/lampp/etc/...或者换句话说/{dir-to-stack}/lampp/etc
    猜你喜欢
    • 2018-08-02
    • 2013-08-08
    • 1970-01-01
    • 2022-11-04
    • 2014-07-03
    • 2021-11-15
    • 1970-01-01
    • 1970-01-01
    • 2019-12-27
    相关资源
    最近更新 更多