If you want to use Ubuntu as the website server, some basic services are essential. This article makes a simple arrangement for the establishment of the environment.
Appach
Apache is the world's No. 1 Web server software. It can run on almost all widely used computer platforms. Because of its wide use of cross-platform and security, it is one of the most popular Web server software.
Install
sudo apt-get install apache2
About 5 MB. After installation, the server will automatically start
Enter http: // localhost, http: // 127.0.0.1, or IP in the browser. If It works is displayed !, It means that Apache is successfully installed. By default, Apache will create a directory named www under/var, which is the Web directory, all Web files that can be accessed through a browser must be placed in this directory.
If you change the configuration, restart the command as follows:
sudo /etc/init.d/apache2 restart
Here, if you just run some static Web pages, you only need to put the designed html file into the/var/www directory.
One problem I encountered here is that the level-2 directory under the root directory cannot be accessed and re-installed multiple times, which is the same problem.
PHP
PHP support is also a must for many websites. The installation command is as follows:
sudo apt-get install libapache2-mod-php5 php5
You need to download the installation package about 6 MB. Installation extension:
sudo apt-get install libapache2-mod-php5 php5
For more details, please continue to read the highlights on the next page:
Recommended reading:
Build your own wiki and Forum under Ubuntu (figure)
Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04
Install LAMP and phpMyAdmin in Ubuntu
Install and configure LAMP in Ubuntu 12.04
Compile and install LAMP in CentOS 5.9 (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12)
Source code for Web server architecture in RedHat 5.4 build the LAMP environment and application PHPWind
Build a WEB Server Linux + Apache + MySQL + PHP in the LAMP source code Environment