Ubuntuapachephpp

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Web Applications Implementation.

IES Pau Casesnoves

Installing a web application server on ubuntu server using apache and php.
Create a new engine called ubuntuWebApplication using VM VirtualBox. Install ubuntu server 11.04.
Make the installation in Enghish. Do not install the LAMP server.

Configure network
First, we are going to enable two network devices in the VirtualBox Configuration Sheet.

Next, we are going to configure the interfaces sudo vi /etc/network/interfaces For instance we could write: auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.2.x netmask 255.255.255.0 gateway 192.168.2.1 We need restart network: sudo /etc/init.d/networking restart

Installing Apache 2
sudo apt-get install apache2 It requires a restart for it to work sudo /etc/init.d/apache2 restart

Checking Apache 2 installation


From your host computer with your web browser, go to the URI http://192.168.56.x : if you read "It works!", which is the content of the file /var/www/index.html , this proves Apache works.

Installing PHP 5
To only install PHP5. install the package libapache2-mod-php5

Enable this module by doing sudo a2enmod php5 which creates a symbolic link /etc/apache2/mods-enabled/php5 pointing to /etc/apache2/mods-availble/php5 . Relaunch Apache 2 by sudo service apache2 restart

Checking PHP 5 installation


In /var/www , create a text file called "prova.php" <?php phpinfo(); ?> then, with your web browser, go to the URI "http://192.168.56.x/prova.php": if you can see a description of PHP5 configuration, it proves PHP 5 works with Apache.

Install FTP Server


Sudo apt-get install vsftpd Enable write /etc/vsftpd.conf
write_enable=YES Check it updloading a file

You might also like