sudo systemctl restart apache2 fail

Я пробовал web aparch2 на ubuntu16.04. Сначала это сработало. Я установил aparch2, mysql, php и попробовал info.php, он работал хорошо. Затем я устанавливаю wordpress и меняю /etc/apache2/mods-enabled/dir.conf как:


    DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm

Я также меняю mysql (создаю базу данных wordpress) и wp-config.php (sudo mv wp-config-sample.php wp-config.php) Я следую: https://www.tecmint.com/install-wordpress-on-ubuntu-16-04-with-lamp/ Но я не могу перезапустить apache2. Сообщение следующее:

liwenz@ubuntu:/var/www/html$ sudo systemctl restart apache2.service
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
liwenz@ubuntu:/var/www/html$ systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Tue 2020-08-04 10:28:31 EDT; 28s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 22757 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCES
  Process: 18640 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SU
  Process: 24828 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAIL

Aug 04 10:28:31 ubuntu apache2[24828]:  *
Aug 04 10:28:31 ubuntu apache2[24828]:  * The apache2 configtest failed.
Aug 04 10:28:31 ubuntu apache2[24828]: Output of config test was:
Aug 04 10:28:31 ubuntu apache2[24828]: apache2: Syntax error on line 141 of /etc
Aug 04 10:28:31 ubuntu apache2[24828]: Action 'configtest' failed.
Aug 04 10:28:31 ubuntu apache2[24828]: The Apache error log may have more inform
Aug 04 10:28:31 ubuntu systemd[1]: apache2.service: Control process exited, code
Aug 04 10:28:31 ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Aug 04 10:28:31 ubuntu systemd[1]: apache2.service: Unit entered failed state.
Aug 04 10:28:31 ubuntu systemd[1]: apache2.service: Failed with result 'exit-cod

liwenz@ubuntu:/var/www/html$ journalctl -xe
Aug 04 10:28:31 ubuntu apache2[24828]: The Apache error log may have more inform
Aug 04 10:28:31 ubuntu systemd[1]: apache2.service: Control process exited, code
Aug 04 10:28:31 ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit apache2.service has failed.
-- 
-- The result is failed.
Aug 04 10:28:31 ubuntu systemd[1]: apache2.service: Unit entered failed state.
Aug 04 10:28:31 ubuntu systemd[1]: apache2.service: Failed with result 'exit-cod
Aug 04 10:28:31 ubuntu sudo[24825]: pam_unix(sudo:session): session closed for u
Aug 04 10:28:45 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:28:53 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:29:06 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:29:18 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:29:35 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:29:42 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:29:56 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:30:05 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:30:19 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
Aug 04 10:30:27 ubuntu dhclient[1078]: DHCPREQUEST of 192.168.0.13 on ens33 to 2
lines 1088-1110/1110 (END)

0
задан 4 August 2020 в 20:46

1 ответ

строка 139-141 в / etc / apache2 / apache2.conf:

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

Я думаю, что ошибка должна быть в mods-enabled / *. Conf Я когда-либо менял /etc/apache2/mods-enabled/dir.conf, поэтому обнаружил ошибку в файле. Теперь я мог перезапустить. Спасибо за помощь!

1
ответ дан 11 August 2020 в 20:11

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

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