A
A
Andrew2015-06-26 16:51:31
linux
Andrew, 2015-06-26 16:51:31

How to overcome the error "Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details."?

I have a home server on CentOS 7 (I am studying Linux on it), I want to set up a web server on it, I installed everything (mysql, apache, php, phpmyadmin), everything works fine, but when I try to set up virtual hosts, this error appears at startup /restart apache (apachectl restart):

Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

Apache also stops running if you put mod_ssl, the same error pops up.
FILE httpd.conf
pastebin.com/nDnBiKGq
systemctl status httpd.service -l
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since Пт 2015-06-26 17:19:42 MSK; 2min 1s ago
  Process: 2942 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 2940 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 2940 (code=exited, status=1/FAILURE)

июн 26 17:19:42 server.home systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
июн 26 17:19:42 server.home kill[2942]: kill: cannot find process ""
июн 26 17:19:42 server.home systemd[1]: httpd.service: control process exited, code=exited status=1
июн 26 17:19:42 server.home systemd[1]: Failed to start The Apache HTTP Server.
июн 26 17:19:42 server.home systemd[1]: Unit httpd.service entered failed state.

journalctl -xn
-- Logs begin at Пт 2015-06-26 16:12:50 MSK, end at Пт 2015-06-26 17:22:47 MSK. --
июн 26 17:20:01 server.home systemd[1]: Created slice user-0.slice.
-- Subject: Unit user-0.slice has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished starting up.
--
-- The start-up result is done.
июн 26 17:20:01 server.home systemd[1]: Starting Session 11 of user root.
-- Subject: Unit session-11.scope has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-11.scope has begun starting up.
июн 26 17:20:01 server.home systemd[1]: Started Session 11 of user root.
-- Subject: Unit session-11.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-11.scope has finished starting up.
--
-- The start-up result is done.
июн 26 17:20:01 server.home CROND[2952]: (root) CMD (/usr/lib64/sa/sa1 1 1)
июн 26 17:22:46 server.home systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
июн 26 17:22:47 server.home systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
июн 26 17:22:47 server.home kill[2966]: kill: cannot find process ""
июн 26 17:22:47 server.home systemd[1]: httpd.service: control process exited, code=exited status=1
июн 26 17:22:47 server.home systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
июн 26 17:22:47 server.home systemd[1]: Unit httpd.service entered failed state.

In this case, I configured according to this article: sys-admin.kz/os/nix/614-create-several-virtualhost... (I took into account the errors in the paths and corrected it myself)
I also tried these articles:
www.8host .com/blog/nastrojka-virtualnyx-xostov-apa...
i-leon.ru/%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%.. The
error is the same, I ask for help, I can’t even imagine what it could be, my hands are already falling ...
PS If you need some more data, then write
UPD: fixed a small error in the paths and replaced the output of systemctl status httpd.service -l and journalctl -xn. The question is still relevant.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2015-06-27
@ntzch

In general, the problem was found - SELinux, I still don’t know how to configure it, so I decided to just disable it for now ...
Instructions here how to do it: https://docs.fedoraproject.org/ru-RU/Fedora/13/htm..
After disabling SELinux, you must restart your computer .

E
Ergil Osin, 2015-06-26
@Ernillew

Could not open configuration file /etc/httpd/sites-enabled/test.local.conf: No such file or directory

The file says no.
And you refer to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question