Apache cannot be used after upgrading to Ubuntu16.04

WBOY
Release: 2016-07-06 13:51:59
Original
1208 people have browsed it

The operating system I originally used was Ubuntu 14.04 LTS Desktop, with apache2, php5.3 and mysql installed on it. Later, the system prompted me to upgrade to 15.10. The upgrade was successful and during the upgrade process, I was asked whether to keep the configuration files such as php;
Shortly afterwards, I was prompted to upgrade to 16.04 LTS, and then I upgraded. The upgrade was successful, but I was not asked whether to keep the configuration file during the upgrade process. I was a little confused at the time.
After the upgrade was completed, I did not get any response when accessing this server. Then I found that my php5 was gone, and an error message was prompted when starting apache2 (it seemed that the php mod was not found)
Then I sudo apt install php libapache2-mod-php installed php7. I found that apache can be started without errors
However, there is still no response when accessing this server. . .

So what to do now

Reply content:

The operating system I originally used was Ubuntu 14.04 LTS Desktop, with apache2, php5.3 and mysql installed on it. Later, the system prompted me to upgrade to 15.10. The upgrade was successful and during the upgrade process, I was asked whether to keep the configuration files such as php;
Shortly afterwards, I was prompted to upgrade to 16.04 LTS, and then I upgraded. The upgrade was successful, but I was not asked whether to keep the configuration file during the upgrade process. I was a little confused at the time.
After the upgrade was completed, I did not get any response when accessing this server. Then I found that my php5 was gone, and an error message was prompted when starting apache2 (it seemed that the php mod was not found)
Then I sudo apt install php libapache2-mod-php installed php7. I found that apache can be started without errors
However, there is still no response when accessing this server. . .

So what to do now

I previously installed 16.04 and installed PHP and the default was 7.. Then I reinstalled the system

It is best not to upgrade, just upgrade the security components.

Or you can install php5 once in the source code and then change the apache configuration file and fpm to load php5 related support.

Upgrade your hair. . . Or reinstall it. . . Who knows the file or directory is still intact. . .

Okay, here’s the situation now. My Ubuntu is installed on a VMware virtual machine. Let’s assume its IP address is A. In the past, on the physical machine, I could access it directly http://A, but now I can’t access it. .
But if you do port mapping in the virtual machine, map 127.0.0.1:3721 to A:80, and then access localhost:3721, you can successfully access the virtual machine.
So currently apache should be running normally. The problem lies in cross-network segment access (the host IP and A are not in the same network segment). However, the port mapping works and the virtual network adapter is also normal. The key is my Ubuntu How could an upgrade affect the virtual machine configuration?
Anyway, I use this server as a test environment, so I just use localhost to access it, and then I am too lazy to replace apache with nginx

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template