Menu Close

Job for apache2.service failed & error

In some case, you got some trouble in Apche2 operation at your server. When the suddenly you meet “Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” “error message, let’s take it easy and think on first.

All the time, you don’t have to reinstall Apache2, because apache2 is robust server system. So keep that in mind and look at some critical command, system error message, and log files

If the error was for /etc/apache2/apache2.conf and there is some syntax error in the file, you could this command and fit it.

# apache2ctl configtoest

It will highlight the error. Correct it. This is mostly a configuration error. So you had to disable it before reloading Apache & reload.

If you will remove Apache server from your Linux server, then

# sudo apt-get purge apache2 
# sudo apt-get install apache 2

It now works fine. Remember that  you would better save your own virtual hosting conf. files from sites-available folder or basic setting variables from default conf. files.