Because I don’t knowubuntu
16.04 has installedapache
andmysql
by default, and I deleted allapache* in the system due to my handicap.
file, the specific deletion steps are as follows:
$ sudo apt-get --purge remove apache-common $ sudo apt-get --purge remove apache $ sudo find /etc -name "*apache*" |xargs rm -rf $ sudo rm -rf /var/www $sudo rm -rf /etc/libapache2-mod-jk
After deletion is complete, reinstall:
$ sudo apt-get install apache2
However, the problem arises. When accessinglocalhost
in the browser, the result is as follows:
When trying to restart theapache
service:
Then, I checked the/etc/apache2
directory and found that theapache
configuration fileapache2.conf
## was missing.
apache*files, but reinstalling
apachedid not generate these necessary files, so There is no
apacheconfiguration file or anything like that.
How can I make the newly installedapachework, or restore it to the
apachebefore deletion? I beg God to answer!
It seems that you have also deleted the apache service, causing the service to not run properly. The only option is to reinstall apache
install
的时候,提示是已经装好,所以没有做其他任何事情。。。。可是你删很多的东西。你
remove
的时候并不是apache2
。所以remove
Try reinstalling later.