Ubuntu job for apache2 service failed because the control process exited with error code

Trying to restart apache from terminal using the following command: sudo service apache2 restart When executing that command, I'm getting below error: Job for apache2.service failed. See "

Trying to restart apache from terminal using the following command:

 sudo service apache2 restart

When executing that command, I’m getting below error:

Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for details.

On excuting «systemctl status apache2.service» I get this output:

apache2.service - (null)
   Loaded: loaded (/etc/init.d/apache2)
   Active: failed (Result: exit-code) since Sat 2015-05-30 02:22:41 IST; 12s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4866 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Apache error.log:

AH00489: Apache/2.4.12 (Unix) configured -- resuming normal operations
AH00094: Command line: '/usr/local/apache2/bin/httpd'

Artur Meinild's user avatar

asked May 29, 2015 at 20:48

Gautam Savaliya's user avatar

Gautam SavaliyaGautam Savaliya

2,2413 gold badges13 silver badges10 bronze badges

7

There is some syntax error in the file apache2.conf.

In a terminal, type:

cd /etc/apache2

Then:

apache2ctl configtest

It will show you where is the error in the apache2.conf file to correct.

Eliah Kagan's user avatar

Eliah Kagan

115k53 gold badges311 silver badges484 bronze badges

answered Aug 1, 2016 at 18:31

rancho's user avatar

9

Maybe this will help to find the cause:

journalctl | tail

In my case it was a mistake in the configuration file:

AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/mydomain-wsf.lan.conf

Andrea Corbellini's user avatar

answered Aug 18, 2015 at 10:16

Arek's user avatar

ArekArek

9766 silver badges7 bronze badges

5

The problem is because some configuration files are deleted, you have to reinstall it.

REINSTALL APACHE2:

To replace configuration files that have been deleted, without purging the package, you can do:

sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2

To fully remove the apache2 config files, you should:

sudo apt-get purge apache2

which will then let you reinstall it in the usual way with:

sudo apt-get install apache2

Purge is required to remove all the config files — if you delete the config files but only remove the package, then this is remembered & missing config files are not reinstalled by default.

Then REINSTALL PHP5:

apt-get purge libapache2-mod-php5 php5 && 
apt-get install libapache2-mod-php5 php5

Parto's user avatar

Parto

14.8k24 gold badges85 silver badges113 bronze badges

answered Mar 15, 2016 at 10:06

Rujika Rajan's user avatar

2

Problem:

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

Solution:

  • To fully remove the apache2 config files, you should:

    1) sudo apt-get purge apache2

  • which will then let you reinstall it in the usual way with:

    2) sudo apt-get install apache2

==> It Works fine…

thanks….

Videonauth's user avatar

Videonauth

32.6k16 gold badges102 silver badges119 bronze badges

answered Dec 27, 2016 at 7:12

Riyal Padhiyar's user avatar

I got the same error after removing a virtual host. The problem was the lingering SSL conf file associated with that host located in /etc/apache2/sites-enabled. The SSL was through Let’s Encrypt so the code for me to remove was:

sudo rm yourdomain.com-le-ssl.conf

answered Mar 1, 2017 at 19:47

iMarketingGuy's user avatar

0

you most likely have a syntax error. for me it was in my ‘sites-enabled’ folder.

i mis-spelled ‘ServerAlias’ to ‘ServerAlisa’.

answered Sep 15, 2017 at 12:12

Bruce Tong's user avatar

1

I got the Same errors While working with .htaccess

I just put this command

<Directory /var/www/html>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
</Directory>

in /etc/apache2/sites-enabled/000-default.conf this folder

after adding this i have getting the error

then i delete these peace of command from the file and my error has resolved.

answered Jul 26, 2017 at 5:48

Kaushikdjay's user avatar

This is mostly a configuration error. I just now had an old site enabled on apache, what caused this error. So I had to disable it before reloading apache.

sudo a2dissite <my-site>
sudo service apache2 reload

Problem solved :)

answered Aug 20, 2016 at 6:15

Thomas Venturini's user avatar

Thank you for your help! I was able to install correctly with Solution:

To fully remove the apache2 config files, you should:

  1. sudo apt-get purge apache2
    which will then let you reinstall it in the usual way with:

  2. sudo apt-get install apache 2

It now works fine.

muru's user avatar

muru

189k52 gold badges460 silver badges711 bronze badges

answered Jan 16, 2017 at 1:41

Renata Sembay's user avatar

I think the problem is that you have some site enabled but you deleted its configuration file. Try disabling the site with
sudo a2dissite «name»
and then restart apache server. At least this was the problem for me and this action solved it.

answered May 16, 2017 at 14:56

Ilias Koritsas's user avatar

In my case, the error started to appear after doing apt upgrade. After playing a lot I went to following directories to see what I can disable.

  • /etc/apache2/mods-enabled — a2dismod (to turn back on a2enconf)
  • /etc/apache2/conf-enabled — a2disconf (to turn back on a2enconf)

In my case, I had to those MODS enabled.

enter image description here

It seems that apt-upgrade must have removed/broken php7.2 because as soon as I disabled it and restarted everything worked. Of course, in anyone else’s case, it may be something different. When Apache crashes it may be bad config or bad mod. You have to pick your battles.

answered Sep 8, 2019 at 11:20

MadBoy's user avatar

MadBoyMadBoy

5615 silver badges11 bronze badges

For what it may be relevant at this stage, but today I came across the same problem and it turned out to be an issue with the certificate file.

So eventually the config was all ok, but in uploading the new .crt content I did in the wrong file, meaning there were no more matching for a particular site and the whole server was refusing to start.

No indication of incorrect SSL certificate in the log or anywhere else, which took me a while to figure out.

answered Mar 7, 2020 at 9:14

Andrea Moro's user avatar

Andrea MoroAndrea Moro

4211 gold badge5 silver badges15 bronze badges

I am using Ubuntu 15 64-bit:

$ uname -a
Linux {hostname} 4.2.0-16-generic

And I have installed apache2:

$ sudo apt-get install -y apache2

I have a mod_xxx.so, which I have placed into: /usr/lib/apache2/modules/. I set the permissions to 755 (rwx r-x r-x).

I edited the apache2.conf:

$ sudo vi /etc/apache2/apache2.conf
AddHandler xxx-handler .xxx
LoadModule xxx_module modules/mod_xxx.so

I know this works, as I have done this on several other Linux machines before.

When I try to restart Apache, it is failing with this error:

$ sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

After doing, what it says above, systemctl status apache2.service, it shows this:

apache2.service - LSB: Apache2 web server
 Loaded: loaded (/etc/init.d/apache2)
 Active: failed (Result: exit-code) since Wed 2016-03-09 10:32:34 GMT; 9s ago
  Docs: man:systemd-sysv-generator(8)
Process: 3479 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 3503 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Mar 09 10:32:34 Ubuntu14 apache2[3503]: *
Mar 09 10:32:34 Ubuntu14 apache2[3503]: * The apache2 configtest failed.
Mar 09 10:32:34 Ubuntu14 apache2[3503]: Output of config test was:
Mar 09 10:32:34 Ubuntu14 apache2[3503]: apache2: Syntax error on line 224 of...y
Mar 09 10:32:34 Ubuntu14 apache2[3503]: Action 'configtest' failed.
Mar 09 10:32:34 Ubuntu14 apache2[3503]: The Apache error log may have more i....
Mar 09 10:32:34 Ubuntu14 systemd[1]: apache2.service: Control process exite...=1
Mar 09 10:32:34 Ubuntu14 systemd[1]: Failed to start LSB: Apache2 web server.
Mar 09 10:32:34 Ubuntu14 systemd[1]: apache2.service: Unit entered failed state.
Mar 09 10:32:34 Ubuntu14 systemd[1]: apache2.service: Failed with result 'e...'.
Hint: Some lines were ellipsized, use -l to show in full.

So I have tried to search everywhere for where LoadModule is specified. So I have tried doing this:

$ sudo grep "LoadModule" /

I have also tried this:

sudo find / -type f grep -l "LoadModule"

Still no luck.

Where is the LoadModule specified, in Apache 2.4.12?

I know that in Apache 2.4.7, it is in the apache.conf file, which I have used the same logic here that I have used in the newer version.

This is done on a Virtual Machine, so if an error does happen, I can clean the machine and start again. I am the root user too.

I have multiple php versions installed on my Ubuntu 18.04 — php7.1 php5.6
When I’m using php7.1 apache restarts successfully.
But when I switch to php5.6 using this command:

sudo a2dismod php7.1 ; sudo a2enmod php5.6 ; sudo service apache2 restart

Apache gives me this error:

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

systemctl status apache2.service result:

● 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 Sat 2018-10-27 13:19:32 +06; 7s ago
Process: 6458 ExecStart=/usr/sbin/apachectl start (code=exited, status=139)

Oct 27 13:19:32 protectedfor apachectl[6458]: AH00112: Warning: 
DocumentRoot [/home/protectedfor/scj] does not exist
Oct 27 13:19:32 protectedfor apachectl[6458]: AH00112: Warning: 
DocumentRoot [/var/www/worldclass/worldclass.kg] does not exist
Oct 27 13:19:32 protectedfor apachectl[6458]: [Sat Oct 27 13:19:32.683512 2018] [alias:warn] [pid 6469] AH00671: The Alias directive in /etc/apache2/apache2.conf at line
Oct 27 13:19:32 protectedfor apachectl[6458]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerNa
Oct 27 13:19:32 protectedfor apachectl[6458]: Segmentation fault (core dumped)
Oct 27 13:19:32 protectedfor apachectl[6458]: Action 'start' failed.
Oct 27 13:19:32 protectedfor apachectl[6458]: The Apache error log may have more information.
Oct 27 13:19:32 protectedfor systemd[1]: apache2.service: Control process exited, code=exited status=139
Oct 27 13:19:32 protectedfor systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 27 13:19:32 protectedfor systemd[1]: Failed to start The Apache HTTP Server.

Apache log:

[Sat Oct 27 12:43:02.172511 2018] [mpm_prefork:notice] [pid 6518] AH00169: caught SIGTERM, shutting down
[Sat Oct 27 12:43:10.498278 2018] [so:warn] [pid 5126] AH01574: module php7_module is already loaded, skipping
[Sat Oct 27 12:43:10.544626 2018] [mpm_prefork:notice] [pid 5137] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Sat Oct 27 12:43:10.544656 2018] [core:notice] [pid 5137] AH00094: Command line: '/usr/sbin/apache2'
[Sat Oct 27 12:43:28.243406 2018] [mpm_prefork:notice] [pid 5137] AH00169: caught SIGTERM, shutting down

Any advices really appreciated. Thanks!

11 сентября, 2020 11:58 дп
3 856 views
| Комментариев нет

Centos, Debian, LAMP Stack, RHEL, Ubuntu

Эта серия мануалов поможет вам предотвратить или устранить самые распространенные ошибки, которые возникают при работе с веб-сервером Apache.

Каждый мануал в этой серии включает описание распространенных ошибок Apache, связанных с конфигурацией, сетью, файловой системой или привилегиями.

Сообщение об ошибке «AH00526: Syntax error» возникает, когда в конфигурационных файлах Apache есть опечатки или неверно настроенные параметры. Это общая ошибка, которая может указывать на ряд базовых проблем.

Ошибку можно обнаружить с помощью команды apachectl configtest еще перед загрузкой нерабочей конфигурации. Ее также можно найти с помощью команд systemctl и journalctl. В последних двух случаях Apache не сможет работать из-за ошибки.

Если вы обнаружили ошибку с помощью apachectl, перейдите к разделу, посвященному apachectl, в мануале Устранение общих ошибок Apache. Далее мы расскажем, как использовать systemctl для устранения этой ошибки.

Устранение ошибки с помощью systemctl

Согласно инструкциям по устранению неполадок из мануала Устранение общих ошибок Apache, первым шагом при устранении ошибки AH00526 будет проверка состояния Apache с помощью systemctl. Сейчас нам важно понять, влияет ли ошибка на запущенный процесс и препятствует ли она запуску Apache.

В дистрибутивах Ubuntu и Debian выполните следующую команду, чтобы проверить статус Apache:

sudo systemctl status apache2.service -l --no-pager

В системах CentOS и Fedora для проверки статуса Apache используйте эту команду:

sudo systemctl status httpd.service -l --no-pager

Флаг -l выводит все содержимое строки (то есть содержимое длинных строк не будет заменено многоточием (…)). Флаг –no-pager выводит весь на экран весь лог, не вызывая при этом инструмент less, который показывает только фрагмент содержимого.

Если в файлах действительно обнаружена ошибка AH00526, вы должны получить примерно такой вывод:

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 Wed 2020-07-15 13:45:49 UTC; 1min 37s ago
. . .
Jul 15 13:45:49 f17f01056c5b systemd[1]: Starting The Apache HTTP Server...

Jul 15 13:45:49 f17f01056c5b apachectl[15860]: AH00526: Syntax error on line 2 of /etc/apache2/sites-enabled/000-default.conf:


Jul 15 13:45:49 f17f01056c5b apachectl[15860]: Invalid command 'SSSLCertificateFile', perhaps misspelled or defined by a module not included in the server configuration


Jul 15 13:45:49 f17f01056c5b apachectl[15860]: Action 'start' failed.


Jul 15 13:45:49 f17f01056c5b apachectl[15860]: The Apache error log may have more information.


Jul 15 13:45:49 f17f01056c5b systemd[1]: apache2.service: Control process exited, code=exited status=1


Jul 15 13:45:49 f17f01056c5b systemd[1]: apache2.service: Failed with result 'exit-code'.


Jul 15 13:45:49 f17f01056c5b systemd[1]: Failed to start The Apache HTTP Server.

Такой вывод подтвердит, что Apache не работает из-за синтаксической ошибки. В нашем случае ошибка вызвана лишним символом S в начале строки SSSLCertificateFile в файле /etc/apache2/sites-enabled/000-default.conf. Правильная директива – SSLCertificateFile. Чтобы устранить ошибку, вам нужно отредактировать файл и исправить имя директивы, после чего вы сможете запустить Apache.

Вывод systemctl в этом примере также содержит некоторые строки из лога systemd. Если в ваших выходных данных указывается, что определенная строка в вашем конфигурационном файле генерирует синтаксическую ошибку, вы можете пропустить команды journalctl и apachectl configtest. Вы можете перейти непосредственно к указанному файлу, проверить его и исправить ошибку, чтобы устранить AH00526.

Если ваш вывод не содержит информации о конкретном конфигурационном файле Apache, в котором есть ошибка, вам нужно будет изучить выходные данные journalctl из логов systemd. В следующем разделе мы покажем, как использовать journalctl для устранения ошибки AH00526.

Устранение ошибки с помощью journalctl 

Если в выводе systemctl нет сведений о синтаксической ошибке AH00526, вы можете продолжить ее поиски с помощью команды journalctl, которая проверит записи логов systemd на наличие упоминаний Apache.

В системах на основе Ubuntu и Debian выполните следующую команду:

sudo journalctl -u apache2.service --since today --no-pager

В системах типа CentOS, Fedora и RedHat используйте эту команду:

sudo journalctl -u httpd.service --since today --no-pager

Флаг –since today ограничивает вывод записями, зарегистрированными с 00:00:00 текущего дня. Эта опция поможет ограничить объем записей, которые вам понадобится изучить при проверке ошибок.

Если в конфигурации Apache есть ошибка AH00526, в выводе команды journalctl вы найдете такие строки:

-- Logs begin at Tue 2019-11-05 21:26:44 UTC, end at Tue 2020-06-09 15:13:01 UTC. --
. . .
Jun 09 15:12:28 f17f01056c5b apachectl[3157]: AH00526: Syntax error on line 3 of /etc/apache2/sites-enabled/000-default.conf:
Jun 09 15:12:28 f17f01056c5b apachectl[3157]: Invalid command 'SSLCertificateFile', perhaps misspelled or defined by a module not included in the server configuration
. . .

Первая строка вывода – это и есть ошибка AH00526. Она является общей ошибкой, связанной с недопустимой директивой или опечаткой в ​​ конфигурации. В следующей строке вывода объясняется, что вызвало такую ошибку. В данном случае это директива SSLCertificateFile: она будет действительна только в том случае, если модуль ssl включен.

Если вы столкнулись с ошибкой AH00526, связанной с недопустимой директивой SSLCertificateFile, вы можете устранить ее, включив модуль ssl, а затем перезапустив Apache.

Для систем Ubuntu и Debian используйте такую команду, чтобы включить модуль:

sudo a2enmod ssl
sudo systemctl restart apache2.service

В системах CentOS и Fedora сначала установите пакет mod_ssl, а затем загрузите модуль, добавив его в каталог Apache /etc/httpd/conf.modules.d:

sudo yum install mod_ssl
echo "LoadModule ssl_module modules/mod_ssl.so" | sudo tee > /etc/httpd/conf.modules.d/00-ssl.conf
sudo systemctl restart httpd.service

После того как Apache обратится к модулю и вы перезапустите его с помощью соответствующей команды в зависимости от дистрибутива Linux, сервер запустится (если в конфигурации больше нет ошибок).

Если же это не единственная ошибка в конфигурации, Apache и systemctl status продолжат сообщать о них и пытаться объяснить, что препятствует запуску сервера.

В системах Ubuntu и Debian systemctl будет выводить такие сообщения об ошибках:

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details

В системах на основе CentOS, Fedora и RedHat вы получите такое сообщение:

Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.

Если же Apache по-прежнему не запускается из-за ошибок, команда apachectl configtest может быть наиболее эффективным и действенным способом диагностики в этом случае. В следующем разделе мы расскажем, как использовать эту утилиту для устранения ошибки AH00526.

Устранение ошибки с помощью apachectl

Чтобы устранить ошибку AH00526 с помощью утилиты apachectl, вы можете протестировать конфигурацию Apache с помощью подкоманды configtest. Этот инструмент проанализирует файлы Apache, чтобы определить, допустимо ли их содержимое, и, если нет, найдет неверные настройки в конфигурации.

Команда apachectl configtest полезна для выявления синтаксических ошибок в новой конфигурации веб-сервера перед перезагрузкой. Этот тест поможет вам избежать сбоев в обслуживании в случае неправильных настроек в ваших файлах Apache.

Следующий пример команды вернет сообщение об ошибке синтаксиса AH00526 и объяснит, что вероятная проблема заключается в том, что Apache ссылается на пустой файл SSLCertificateFile:

sudo apachectl configtest
AH00526: Syntax error on line 3 of /etc/apache2/sites-enabled/000-default.conf:
SSLCertificateFile: file '/etc/ssl/certs/example.com.pem' does not exist or is empty

В этом примере файл /etc/ssl/certs/example.com.pem не существует, что и указано в сообщении об ошибке. Чтобы решить проблему, вам нужно добавить сертификат SSL/TLS в файл или удалить эту директиву.

Если в конфигурации нет ошибок, команда apachectl должна показать следующее:

Syntax OK

Заключение

В этом мануале вы узнали, как устранить синтаксическую ошибку Apache AH00526. Первым шагом при исследовании любой ошибки Apache является проверка статуса сервера с помощью команды systemctl status apache2 или systemctl status httpd (в зависимости от вашего дистрибутива Linux). Так вы можете определить, правильно ли работает Apache или он не может запуститься из-за ошибки.

После того, как вы определили состояние Apache, вы можете дополнительно диагностировать его с помощью journalctl и изучить логи system для этого процесса. Затем вы можете использовать команду apachectl configtest, чтобы проверить файлы конфигурации на наличие ошибок.

Tags: Apache, apachectl, journalctl, systemctl

Откуда там на второй строчке это написано? И пробел лишний уберите.

я не совсем понял о чем вы

сейчас у меня стартовая страница zabbix выглядит как белый экран с каким то кодом:

<?php
/*
** Zabbix
** Copyright (C) 2001-2020 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
**/
require_once dirname(__FILE__).'/include/classes/user/CWebUser.php';
CWebUser::disableSessionCookie();

require_once 

dirname(__FILE__).'/include/config.inc.php';
require_once 
dirname(__FILE__).'/include/forms.inc.php';$page['title'] = _('ZABBIX');
$page['file'] = 'index.php';// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION
$fields = [
'name' => [T_ZBX_STRO_NO, null, null, 'isset({enter}) && {enter} != "'.ZBX_GUEST_USER.'"'_('Username')],
'password' => [T_ZBX_STRO_OPTnull, null, 'isset({enter}) && {enter} != "'.ZBX_GUEST_USER.'"'],
'sessionid' => [T_ZBX_STRO_OPTnull, null, null],
'reconnect' => [T_ZBX_INTO_OPTP_SYS, null, null],
'enter' => [T_ZBX_STRO_OPTP_SYS, null, null],
'autologin' => [T_ZBX_INTO_OPTnull, null, null],
'request' => [T_ZBX_STRO_OPTnull, null, null],
'form' => [T_ZBX_STRO_OPTnull, null, null]
];
check_fields($fields);$config select_config();

if (

hasRequest('reconnect') && CWebUser::isLoggedIn()) {
if ($config['saml_auth_enabled'] == ZBX_AUTH_SAML_ENABLED && $config['saml_slo_url'] !== ''
&& CSession::keyExists('saml_data')) {
redirect('index_sso.php?slo');
} CWebUser::logout();
redirect('index.php');
}
$autologin hasRequest('enter') ? getRequest('autologin'0) : getRequest('autologin'1);
$request getRequest('request''');

if (

$request) {
$test_request = [];
preg_match('/^/?(?<filename>[a-z0-9_.]+.php)(?<request>?.*)?$/i'$request$test_request); $request = (array_key_exists('filename'$test_request) && file_exists('./'.$test_request['filename']))
$test_request['filename'].(array_key_exists('request'$test_request) ? $test_request['request'] : '')
'';
}

if (!

hasRequest('form') && $config['http_auth_enabled'] == ZBX_AUTH_HTTP_ENABLED
&& $config['http_login_form'] == ZBX_AUTH_FORM_HTTP && !hasRequest('enter')) {
redirect('index_http.php'); exit;
}
// login via form
if (hasRequest('enter') && CWebUser::login(getRequest('name'ZBX_GUEST_USER), getRequest('password'''))) {
if (CWebUser::$data['autologin'] != $autologin) {
API::User()->update([
'userid' => CWebUser::$data['userid'],
'autologin' => $autologin
]);
} $redirect array_filter([CWebUser::isGuest() ? '' $requestCWebUser::$data['url'], ZBX_DEFAULT_URL]);
redirect(reset($redirect)); exit;
}

if (

CWebUser::isLoggedIn() && !CWebUser::isGuest()) {
redirect(CWebUser::$data['url'] ? CWebUser::$data['url'] : ZBX_DEFAULT_URL);
}
$messages clear_messages();

echo (new 

CView('general.login', [
'http_login_url' => ($config['http_auth_enabled'] == ZBX_AUTH_HTTP_ENABLED)
? (new CUrl('index_http.php'))->setArgument('request'getRequest('request'))
'',
'saml_login_url' => ($config['saml_auth_enabled'] == ZBX_AUTH_SAML_ENABLED)
? (new CUrl('index_sso.php'))->setArgument('request'getRequest('request'))
'',
'guest_login_url' => CWebUser::isGuestAllowed() ? (new CUrl())->setArgument('enter'ZBX_GUEST_USER) : '',
'autologin' => $autologin == 1,
'error' => (hasRequest('enter') && $messages) ? array_pop($messages) : null
]))->getOutput();

че происходит, я не понимаю, сам по себе живет как-будто

При вводе команды sudo service apache2 reload:
Job for apache2.service failed because the control process exited with error code. See «systemctl status apache2.service» and «journalctl -xe» for details.

Вывод при systemctl status apache2.service -l:
● apache2.service — LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (exited) (Result: exit-code) since Вт. 2015-11-24 16:54:20 MSK; 19min ago
Docs: man:systemd-sysv-generator(8)
Process: 5848 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)

нояб. 24 17:07:43 artem-desktop apache2[4417]: *
нояб. 24 17:07:43 artem-desktop apache2[4417]: * Apache2 is not running
нояб. 24 17:07:43 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=1
нояб. 24 17:07:43 artem-desktop systemd[1]: Reload failed for LSB: Apache2 web server.
нояб. 24 17:10:55 artem-desktop systemd[1]: Reloading LSB: Apache2 web server.
нояб. 24 17:10:55 artem-desktop apache2[5848]: * Reloading web server apache2
нояб. 24 17:10:55 artem-desktop apache2[5848]: *
нояб. 24 17:10:55 artem-desktop apache2[5848]: * Apache2 is not running
нояб. 24 17:10:55 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=1
нояб. 24 17:10:55 artem-desktop systemd[1]: Reload failed for LSB: Apache2 web server.

Вывод при journalctl -xe:
— The result is failed.
нояб. 24 17:10:55 artem-desktop polkitd(authority=local)[738]: Unregistered Authentication Agent for unix-process:5838:102243 (system bus name :1.126, object path /org/freedesktop
нояб. 24 17:10:55 artem-desktop sudo[5837]: pam_unix(sudo:session): session closed for user root
нояб. 24 17:11:04 artem-desktop pkexec[5869]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
нояб. 24 17:11:04 artem-desktop pkexec[5869]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
нояб. 24 17:11:04 artem-desktop pkexec[5869]: artem: Executing command [USER=root] [TTY=unknown] [CWD=/home/artem] [COMMAND=/usr/lib/update-notifier/package-system-locked]
нояб. 24 17:11:05 artem-desktop com.ubuntu.OneConf[2172]: WARNING:oneconf.hosts:Error in loading other_hosts file: [Errno 2] No such file or directory: ‘/home/artem/.cache/oneconf
нояб. 24 17:17:01 artem-desktop CRON[6066]: pam_unix(cron:session): session opened for user root by (uid=0)
нояб. 24 17:17:01 artem-desktop CRON[6067]: (root) CMD ( cd / && run-parts —report /etc/cron.hourly)
нояб. 24 17:17:01 artem-desktop CRON[6066]: pam_unix(cron:session): session closed for user root
нояб. 24 17:19:06 artem-desktop sudo[6112]: artem : TTY=pts/14 ; PWD=/etc ; USER=root ; COMMAND=/usr/bin/vim hosts
нояб. 24 17:19:06 artem-desktop sudo[6112]: pam_unix(sudo:session): session opened for user root by artem(uid=0)
нояб. 24 17:19:14 artem-desktop sudo[6112]: pam_unix(sudo:session): session closed for user root
нояб. 24 17:19:28 artem-desktop sudo[6118]: artem : TTY=pts/14 ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/service apache2 reload
нояб. 24 17:19:28 artem-desktop sudo[6118]: pam_unix(sudo:session): session opened for user root by artem(uid=0)
нояб. 24 17:19:28 artem-desktop polkitd(authority=local)[738]: Registered Authentication Agent for unix-process:6119:153564 (system bus name :1.132 [/usr/bin/pkttyagent —notify-f
нояб. 24 17:19:28 artem-desktop systemd[1]: Reloading LSB: Apache2 web server.
— Subject: Unit apache2.service has begun reloading its configuration
— Defined-By: systemd
— Support: lists.freedesktop.org/mailman/listinfo/systemd-devel

— Unit apache2.service has begun reloading its configuration
нояб. 24 17:19:28 artem-desktop apache2[6129]: * Reloading web server apache2
нояб. 24 17:19:28 artem-desktop apache2[6129]: *
нояб. 24 17:19:28 artem-desktop apache2[6129]: * Apache2 is not running
нояб. 24 17:19:28 artem-desktop systemd[1]: apache2.service: Control process exited, code=exited status=1
нояб. 24 17:19:28 artem-desktop systemd[1]: Reload failed for LSB: Apache2 web server.
— Subject: Unit apache2.service has finished reloading its configuration
— Defined-By: systemd
— Support: lists.freedesktop.org/mailman/listinfo/systemd-devel

— Unit apache2.service has finished reloading its configuration

— The result is failed.
нояб. 24 17:19:28 artem-desktop sudo[6118]: pam_unix(sudo:session): session closed for user root
нояб. 24 17:19:28 artem-desktop polkitd(authority=local)[738]: Unregistered Authentication Agent for unix-process:6119:153564 (system bus name :1.132, object path /org/freedesktop

не получается запустить апатч

=======================================================

root@csgopro ~ # systemctl enable apache2

apache2.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install enable apache2

root@csgopro ~ # systemctl start 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@csgopro ~ # journalctl -xe

May 12 23:52:28 csgopro.xyz apache2[8964]: Output of config test was:

May 12 23:52:28 csgopro.xyz apache2[8964]: apache2: Syntax error on line 216 of /etc/apache2/apache2.conf: Syntax error on line 8 of /etc/apache2/conf-e

May 12 23:52:28 csgopro.xyz apache2[8964]: Action ‘configtest’ failed.

May 12 23:52:28 csgopro.xyz apache2[8964]: The Apache error log may have more information.

May 12 23:52:28 csgopro.xyz systemd[1]: apache2.service: Control process exited, code=exited status=1

May 12 23:52:28 csgopro.xyz 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.

May 12 23:52:28 csgopro.xyz systemd[1]: apache2.service: Unit entered failed state.

May 12 23:52:28 csgopro.xyz systemd[1]: apache2.service: Failed with result ‘exit-code’.

May 12 23:52:28 csgopro.xyz sudo[8961]: pam_unix(sudo:session): session closed for user root

May 12 23:52:52 csgopro.xyz systemd[1]: Reloading.

May 12 23:52:52 csgopro.xyz systemd[1]: apt-daily.timer: Adding 1h 40min 9.803812s random time.

May 12 23:52:52 csgopro.xyz systemd[1]: Reloading.

May 12 23:52:52 csgopro.xyz systemd[1]: apt-daily.timer: Adding 3h 11min 37.314396s random time.

May 12 23:53:00 csgopro.xyz systemd[1]: Starting LSB: Apache2 web server…

— Subject: Unit apache2.service has begun start-up

— Defined-By: systemd

— Support:

http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Понравилась статья? Поделить с друзьями:
  • Ubuntu i2c error
  • Udid iphone как изменить
  • Ubuntu has experienced an internal error
  • Udi 12154 operation generated oracle error 12154
  • Ubuntu grub error unknown filesystem grub rescue