Почему apache2 не удается запустить сервис?

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
root@rick-hp:/home/rick# 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 2018-09-27 09:48:24 +08; 22s ago
  Process: 16911 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
  Process: 15588 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 17418 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
 Main PID: 15510 (code=exited, status=0/SUCCESS)

Sep 27 09:48:23 rick-hp systemd[1]: Starting The Apache HTTP Server...
Sep 27 09:48:24 rick-hp apachectl[17418]: AH00526: Syntax error on line 3 of /etc/apache2/mods-enabled/dir.conf:
Sep 27 09:48:24 rick-hp apachectl[17418]: Invalid command 'index.xhtml', perhaps misspelled or defined by a modu
Sep 27 09:48:24 rick-hp apachectl[17418]: Action 'start' failed.
Sep 27 09:48:24 rick-hp apachectl[17418]: The Apache error log may have more information.
Sep 27 09:48:24 rick-hp systemd[1]: apache2.service: Control process exited, code=exited status=1
Sep 27 09:48:24 rick-hp systemd[1]: apache2.service: Failed with result 'exit-code'.
Sep 27 09:48:24 rick-hp systemd[1]: Failed to start The Apache HTTP Server.
Can you help? It started once then after trying to config for wordpress I get this.
0
задан 26 September 2018 в 08:18

1 ответ

Проблема может быть лучше понята путем рассмотрения вывода /var/log/apache2/error.log - однако вывод Вы отправили шоу что:

AH00526: Syntax error on line 3 of /etc/apache2/mods-enabled/dir.conf:
Invalid command 'index.xhtml', perhaps misspelled or defined by a modu

Вероятно, что Вы не учли часть конфигурации, такой как:

DirectoryIndex index.xhtml
2
ответ дан 27 October 2019 в 10:02

Другие вопросы по тегам:

Похожие вопросы: