Job for apache2.service failed because the control process exited with error code.

27,003

Solution 1

Here is the answer: https://askubuntu.com/a/1022319/850782

cd /etc/apache2
apache2ctl configtest

probably has some typo in some config file that you have created:

vi /etc/apache2/sites-enabled/yoursite.conf

Solution 2

You may mixed up something in apache2 configuration better to remove and reinstall a fresh apache2 , Hope this will help you .

First uninstall apache2

sudo apt-get purge apache2
sudo apt-get purge apache2-common 
sudo apt-get purge apache* # this will remove completely
sudo apt-get update

Next install fresh apache2

sudo apt-get install apache2 

Next Check for the apache2 status

systemctl status apache2
Share:
27,003

Related videos on Youtube

code-8
Author by

code-8

Updated on September 20, 2022

Comments

  • code-8
    code-8 3 months

    I tried to restart my Apache after updating my config

    sudo service apache2 restart

    I kept getting this

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

    How do I prevent that ?