This article shows the steps required to install Apache in Ubuntu 14. Apache web server is the most used and reliable web server of the world.

This tutorial assumes you have an Ubuntu server, with full root access. The first step is access your Ubuntu server with root by SSH. We will explain how to install Apache httpd and its modules, PHP, Perl and Python.

Install Apache in Ubuntu: starting the process

First of all, you need to update your server packages with apt-get

After completed, you can install Apache with this command:

Now, by default, the root folder of the apache is located in /var/www/html. Let’s enter this directory by issuing this command:

To test Apache, you need to know the ip address of the server. There are two methods to do that:

Method #1 , shows the current hostname of the server. This hostname usually points to the correct IP.

Method #2, this prints the current IP address of the server, from the ifconfig output.

Now the IP address is known. We can now test the installed apache webserver. Open your favourite browser, just type your IP or hostname:

install apache in ubuntu 14 - completed process

Install Apache modules

To install specific apache modules, we can first list the available modules. We should first run this command:

To install one module, just issue these commands. The first command installs the module, and the second a2enmod, enables it into Apache.

Install apache with PHP, Perl and Python modules

You can easily install apache in Ubuntu with these common programming modules, by running these commands:

Install PHP:

Install Python:

Install Perl:

To install MySQL in Ubuntu, you can also read this article: How to install MySQL in Ubuntu
Further documentation about Apache:

Leave a Reply

Your email address will not be published. Required fields are marked *