Fix unable to restart Apache2

On some occasions we may face with problems like Job for apache2.service failed because the control process exited with error code.See "systemctl status apache2.service" and "journalctl -xe" for details. and we will not be able to restart apache2that may come due to several reasons, for instance, if we delete any of the sites in apache2's sites-available, this problem may arise, So in order to fix the problem please do the following steps.

Step1: Find wherever the problem occurred executing this command

sudo apache2ctl configtest

in this case, the deleted site was not disabled, So that must be disabled.

sudo a2dissite yoursite.conf

Restart Apache2

sudo systemctl restart apache2

0 Komentar