Question

Getting error on Apache restart.

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

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello there,

I also want to include great tutorials on Common Apache Errors and How To Troubleshoot Common Apache Errors that you can find really useful if you run into an Apache error and you need some help.

https://www.digitalocean.com/community/tutorial_series/common-apache-errors

https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-apache-errors

Also, this question was previously posted and answered by Bobby which you can check here:

https://www.digitalocean.com/community/questions/how-to-troubleshoot-common-apache-issues-on-linux-server

Feel free to then share the output of the commands listed in that tutorial.

Hope that this helps!

IN systemctl status httpd.service showing like this.

● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2018-01-25 04:57:17 UTC; 37s ago Docs: man:httpd(8) man:apachectl(8) Process: 15234 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 27718 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS) Process: 15232 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 15232 (code=exited, status=1/FAILURE)

Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 systemd[1]: Starting The Apache HTTP Server… Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 httpd[15232]: AH00526: Syntax error on line 126 of /etc/httpd/conf/httpd.conf: Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 httpd[15232]: allow and deny must be followed by ‘from’ Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 kill[15234]: kill: cannot find process “” Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 systemd[1]: httpd.service: control process exited, code=exited status=1 Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 systemd[1]: Failed to start The Apache HTTP Server. Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 systemd[1]: Unit httpd.service entered failed state. Jan 25 04:57:17 centos-s-2vcpu-4gb-blr1-01 systemd[1]: httpd.service failed.

IN journalctl -xe showing like this

– Unit httpd.service has begun starting up. Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 httpd[15323]: AH00526: Syntax error on line 126 of /etc/httpd/conf/httpd.conf: Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 httpd[15323]: allow and deny must be followed by ‘from’ Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 kill[15324]: kill: cannot find process “” Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 systemd[1]: httpd.service: control process exited, code=exited status=1 Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 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. Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 systemd[1]: Unit httpd.service entered failed state. Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 systemd[1]: httpd.service failed. Jan 25 05:00:55 centos-s-2vcpu-4gb-blr1-01 polkitd[565]: Unregistered Authentication Agent for unix-process:15317:24072268 (system bus name :1.288, object path /org/fre Jan 25 05:00:57 centos-s-2vcpu-4gb-blr1-01 unix_chkpwd[15329]: password check failed for user (root) Jan 25 05:00:57 centos-s-2vcpu-4gb-blr1-01 sshd[15312]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=58.218.198.150 user=roo Jan 25 05:00:57 centos-s-2vcpu-4gb-blr1-01 sshd[15312]: pam_succeed_if(sshd:auth): requirement “uid >= 1000” not met by user “root” Jan 25 05:01:00 centos-s-2vcpu-4gb-blr1-01 sshd[15312]: Failed password for root from 58.218.198.150 port 19470 ssh2 Jan 25 05:01:00 centos-s-2vcpu-4gb-blr1-01 unix_chkpwd[15330]: password check failed for user (root) Jan 25 05:01:00 centos-s-2vcpu-4gb-blr1-01 sshd[15312]: pam_succeed_if(sshd:auth): requirement “uid >= 1000” not met by user “root” Jan 25 05:01:01 centos-s-2vcpu-4gb-blr1-01 systemd[1]: Started Session 100 of user root. – Subject: Unit session-100.scope has finished start-up – Defined-By: systemd – Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit session-100.scope has finished starting up.

– The start-up result is done. Jan 25 05:01:01 centos-s-2vcpu-4gb-blr1-01 systemd[1]: Starting Session 100 of user root. – Subject: Unit session-100.scope has begun start-up – Defined-By: systemd – Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit session-100.scope has begun starting up. Jan 25 05:01:01 centos-s-2vcpu-4gb-blr1-01 CROND[15333]: (root) CMD (run-parts /etc/cron.hourly) Jan 25 05:01:01 centos-s-2vcpu-4gb-blr1-01 run-parts(/etc/cron.hourly)[15336]: starting 0anacron Jan 25 05:01:01 centos-s-2vcpu-4gb-blr1-01 run-parts(/etc/cron.hourly)[15342]: finished 0anacron Jan 25 05:01:02 centos-s-2vcpu-4gb-blr1-01 sshd[15312]: Failed password for root from 58.218.198.150 port 19470 ssh2 Jan 25 05:01:05 centos-s-2vcpu-4gb-blr1-01 unix_chkpwd[15346]: password check failed for user (root) Jan 25 05:01:05 centos-s-2vcpu-4gb-blr1-01 sshd[15312]: pam_succeed_if(sshd:auth): requirement “uid >= 1000” not met by user “root”

See “systemctl status httpd.service” and “journalctl -xe” for details.