Debian 8: сбой перезапуска apache2

Я пытаюсь настроить часовой пояс для PHP и после установки, у меня есть набор команд для выполнения при условии,

cd /etc/apache2/mods-enabled/
ln -s ../mods-available/rewrite.load .
ln -s ../mods-available/headers.load .
ln -s ../mods-available/expires.load .
ln -s ../mods-available/ssl.load .
ln -s ../mods-available/ssl.conf .
ln -s ../mods-available/php5* .
ln -s ../mods-available/socache_shmcb.load .

/etc/init.d/apache2 restart

Когда я запускаю последнюю команду с sudoЯ получаю следующую ошибку,

[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!

Когда я печатаю в терминале,

systemctl status apache2.service

Я получаю вывод,

​● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Drop-In: /lib/systemd/system/apache2.service.d
└─forking.conf
Active: failed (Result: exit-code) since Fri 2017-12-08 12:57:08 CET; 5min ago
Process: 23298 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 23587 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Что мне делать в этом случае?

Upadte

Вывод команды sudo cat /var/log/apache2/error.log предоставлен,

​[Fri Dec 08 11:58:17.392972 2017] [mpm_event:notice] [pid 12892:tid 140108409681792] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Fri Dec 08 11:58:17.393055 2017] [core:notice] [pid 12892:tid 140108409681792] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 08 11:58:36.585248 2017] [mpm_event:notice] [pid 12892:tid 140108409681792] AH00493: SIGUSR1 received.  Doing graceful restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Dec 08 11:58:36.588582 2017] [mpm_event:notice] [pid 12892:tid 140108409681792] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Fri Dec 08 11:58:36.588590 2017] [core:notice] [pid 12892:tid 140108409681792] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 08 11:58:39.747035 2017] [mpm_event:notice] [pid 12892:tid 140108409681792] AH00491: caught SIGTERM, shutting down
[Fri Dec 08 11:58:40.816350 2017] [mpm_prefork:notice] [pid 15087] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Fri Dec 08 11:58:40.816435 2017] [core:notice] [pid 15087] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 08 11:58:42.228275 2017] [mpm_prefork:notice] [pid 15087] AH00169: caught SIGTERM, shutting down
[Fri Dec 08 11:58:43.344556 2017] [mpm_prefork:notice] [pid 15186] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Fri Dec 08 11:58:43.344605 2017] [core:notice] [pid 15186] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 08 12:40:45.121960 2017] [mpm_prefork:notice] [pid 15186] AH00169: caught SIGTERM, shutting down​

Вывод команды /usr/sbin/apache2 предоставлен,

[Fri Dec 08 13:30:36.877713 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Fri Dec 08 13:30:36.879775 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Fri Dec 08 13:30:36.879827 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Fri Dec 08 13:30:36.879865 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Fri Dec 08 13:30:36.879905 2017] [core:warn] [pid 23750] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php5.load: No such file or directory​

0

Решение

Вы не правильно включили модуль PHP 5, судя по всему. Попробуйте запустить a2enmod php5Если это не удастся, модуль может быть не установлен, в этом случае попробуйте: apt-get install libapache2-mod-php5 а потом a2enmod php5 снова.

1

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]