Because I don’t know ubuntu
16.04 has installed apache
and mysql
by default, and I deleted all apache* 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 accessing localhost
in the browser, the result is as follows:
When trying to restart the apache
service:
Then, I checked the /etc/apache2
directory and found that the apache
configuration file apache2.conf
## was missing.
The reason seems to be this. When I deleted it before, I deleted all the
apache* files, but reinstalling
apache did not generate these necessary files, so There is no
apache configuration file or anything like that.
How can I make the newly installed apache work, or restore it to the
apache before deletion? I beg God to answer!
phpcn_u15822017-05-16 16:58:59
It seems that you have also deleted the apache service, causing the service to not run properly. The only option is to reinstall apache
高洛峰2017-05-16 16:58:59
install
的时候,提示是已经装好,所以没有做其他任何事情。。。。可是你删很多的东西。
你 remove
的时候并不是apache2
。所以 remove
Try reinstalling later.