The Apache HTTP Server, colloquially called Apache is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. The Apache HTTP Server ("httpd") was launched in 1995 and it has been the most popular web server on the Internet since April 1996.

In this tutorial, we will go through the steps of installing Apache on a Debian 9 server.

Deploying your cloud server
If you have not already registered with Cloudwafer, you should begin by getting signed up. Take a moment to create an account after which you can easily deploy your own cloud servers.

Once you have signed up, log into your Cloudwafer Client Area with the password provided in your mail and deploy your Cloudwafer cloud server.

Updating System Packages
It is always recommended that you update the system to the latest packages before beginning any major installations. This is done with the command below:

sudo apt-get update && sudo apt-get upgrade

Note: The user you are logged in as must have sudo privileges to be able to install packages.

Step 1: Install Apache
Apache is available in the Debian repositories by default, hence the installation is quite straightforward. Issue the command below:

sudo apt install apache2

Step 2: Starting Apache Service
To start the Apache service, issue the following commands below:

sudo systemctl start apache2

Step 3: Check Status of Apache
To check the Apache service run time status information, issue the following command.

sudo systemctl status apache2

Step 4: Enable Apache Service
To enable the Apache Service to start automatically on system boot, issue the following command below:

sudo systemctl enable apache2

Step 5: Checking Apache Version
After installation, you can check the installed version of the Apache webserver on your Debian server, by issuing the following command:

sudo apache2 -v