ubuntu16.04 - ubuntu 16.04 apache2 installed successfully, but dosen't work!!!
天蓬老师
天蓬老师 2017-05-16 16:56:59
0
2
571

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.

#And, the folders are all empty.

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!

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
phpcn_u1582

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!