Apache2 not starting on ubuntu 20.04

Sometimes after an upgrade the system, Apache server does not start any more. Besides, you cannot access to phpmyadmin and in case you can access it, it shows you the source code.
In this article we will see the reasons for this problem and how to fix it.

Starting apache2 server

This happen cause after upgrading your system, a new version of packages have been installed which causes a syntax error. To solve that, you should

remove completely apache2 server by running below command in terminal:

sudo apt-get purge apache2

2- reinstall apache2 server:

sudo apt-get install apache2

3- verify your server status using:

sudo systemctl status apache2

it should look like this !!!

Image for post

Now your apache server is running properly but if you still not having access to your phpmyadmin interface or it display a souce code, you should complete by these more steps:

sudo a2dismod mpm_event

sudo systemctl restart apache2

sudo a2enmod php7.4

sudo systemctl restart apache2

Now check one again. I think it will be ok now.

Was this helpful?

7 / 20

Leave a Reply 1

Your email address will not be published. Required fields are marked *


nbwkeugama

nbwkeugama

Muchas gracias. ?Como puedo iniciar sesion?