In this tutorial we will cover the steps needed to install the Apache web server on your CentOS 6.4, Debian or Ubuntu platform. It is the most popular HTTP server these days.


  • CentOS 6.4, Debian or Ubuntu installed on your computer/server
  • SSH access (Command line access to the server)
  • root privileges
  • Basic skills for working on a Linux environment

Install Apache

The Apache web server is the most popular HTTP server these days. In order to install the service we will use the default package manager included inside the corresponding Linux distribution:

CentOS 6.4


You will be prompted to accept the installation and addition package dependencies will be displayed.

Test the functionality of the Apache service

Once the installation is completed you can test the Apache service using your browser:


where X.X.X.X is your server's IP address, i.e.

You should be able to see the default Apache page inside your browser.

An easy way to find your server's IP address is to execute the following command:

The default Apache web root folder (where your website files should be placed) might differ depending on the Linux platform:

CentOS 6.4


This folder can be additionally configured inside the Apache configuration file:

CentOS 6.4


The variable which should be edited is called DocumentRoot.

Start Up Apache automatically on server boot

In order for the service to start automatically upon server boot up you can execute the following command:

CentOS 6.4


At the end you should have a working Apache web service on your Linux platform.