Install Apache2 + PHP in Ubuntu-Linux Enterprise Application-Linux server application information. For more information, see. Few people have shared articles about Ubuntu. Today, we have just installed Apache2 + PHP, so let's talk about the solution together with the installation method!
First, install Apache2 and php4. Because it is in Ubuntu, we use APT for installation, which is more convenient.
Sudo apt-get install apache2 libapache2-mod-php4 php4
If you want to install PHP5, use
Sudo apt-get install Apache 2 libapache2-mod-php5 php5
At this time, you can first execute Apache2 to see if it can be executed.
Sudo apache2ctl start
(Normally, only one message indicating that ServerName is specified to 127.0.1.1 will appear, and so on)
Check whether Apache2 is normal.
Ps-aux
If you execute OK, open the browser http: // localhost and you will be able to see the preset screen. However, you will find that opening the php file will become a download file. At this time, we will open the configuration file.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.