$ sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
虽然找到了许多网友的解决办法,但是没有一个全套解决办法,只好耐心一个合着试验,最终解决了。
1、重新安装apache2
$ systemctl restart apache2
$ journal -xe
$ sudo apt-get purge apache2
$ sudo apt autoremove apache2
$ sudo apt-get purge apache2
$ sudo apt-get purge apache2*
$ sudo apt-get install apache2
$ sudo service apache2 start
2、重点在这里:重新安装了apache2,网站正常访问了,但是php却无法正常运行,
问题是这个
php7.3没有运行,
所以:sudo a2enmod php7.3
但是出现如下提示:
Considering dependency mpm_prefork for php7.3:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php7.3, aborting
所以接着:
sudo a2dismod mpm_event
Module mpm_event disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
OK,解决了