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

Because I don’t knowubuntu16.04 has installedapacheandmysqlby 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 accessinglocalhostin the browser, the result is as follows:

When trying to restart theapacheservice:

Then, I checked the/etc/apache2directory and found that theapacheconfiguration fileapache2.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 reinstallingapachedid not generate these necessary files, so There is noapacheconfiguration file or anything like that.

How can I make the newly installedapachework, or restore it to theapachebefore 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。所以removeTry 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!