0

Apache will not start. There are no errors in the journal. Where do I find further info?

$ systemctl status httpd.service -l
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2016-09-04 09:26:03 EDT; 2min 35s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 2303 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 2302 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 2302 (code=exited, status=1/FAILURE)
$ journalctl --dmesg
No journal files were found.
5

journalctl --dmesg shows kernel error messages, not application error messages.

journalctl -xe may show more error messages. For example, I added a bad line to my httpd.conf and now I can see

-- Unit httpd.service has begun starting up.
Sep 04 09:39:04 server httpd[24802]: AH00526: Syntax error on line 
Sep 04 09:39:04 server httpd[24802]: Invalid command 'gibber', perh
Sep 04 09:39:04 server systemd[1]: httpd.service: main process exit
Sep 04 09:39:04 server kill[24804]: kill: cannot find process ""
Sep 04 09:39:04 server systemd[1]: httpd.service: control process e
Sep 04 09:39:04 server systemd[1]: Failed to start The Apache HTTP 
-- Subject: Unit httpd.service has failed

Since this is apache you can also run httpd -t which will try and parse the config files and report on any mistakes.

% httpd -t      
AH00526: Syntax error on line 2 of /etc/httpd/conf/httpd.conf:
Invalid command 'gibber', perhaps misspelled or defined by a module not included in the server configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.