Get On
ZoomAdmin Beta...
Note: Beta users will get a VERY special pricing, only limited seats are available, reserve your spot Now!
And Stay Updated On Our Progress ...
How To Install Apache On Linux/Ubuntu


The goal of this article is to go through all the steps necessary to install and configure Apache on Linux, including Free SSL certificate so you have a working SSL protected website by the end. We will use our as our example domain for this article.


  • Installing Apache
  • Configure DigitalOcean DNS
  • Install Let’s Encrypt Free SSL/TLS Certificate
  • Replace Default Apache Website


Installing Apache

Simple step by step instructions on how to install Apache on Linux:

Step 1

Run update command to update package repositories and get latest package information.

sudo apt-get update -y

Note: -y flag means to assume yes and silently install, without asking you questions in most cases.

Step 2
Install Apache Client:
sudo apt-get install -y apache2

Step 3
If you have active Firewall adjust it and enable Apache Server:

sudo ufw allow 'Apache Full'

You can verify the change by running this command:

sudo ufw status

You should see an output like this after running command:

Configure DigitalOcean DNS

Step by Step instructions on configuring DNS for your domain and www subdomain.

Step 1

On your DigitalOcean page navigate to ManageNetworking:

Step 2

Enter domain name (in our example and click Add Domain:

Step 3

After this you should see that this zones are already created.

If not, create them and other necessary zones. We will also create two A zones for domain and www subdomain.

Step 4

Verify DNS Updates have been saved properly. See an Example image below:

Install Let’s Encrypt Free SSL/TLS Certificate

Step By Step instructions on how to get and apply Free SSL/TLS Certificate for both your domain and www subdomain

Step 1

On Ubuntu systems, the Certbot team maintains a PPA. You can add it to your list of repositories and install Certbot by running the following commands.

sudo apt-get update -y

sudo apt-get install -y software-properties-common

sudo add-apt-repository universe

sudo add-apt-repository ppa:certbot/certbot

sudo apt-get update -y

sudo apt-get install -y certbot python-certbot-apache

Step 2

Get certificate:

sudo certbot --apache

Note: you will be asked to enter some information like email address, domains (,, etc.

Step 3

The Certbot packages on your system come with a cron job that will renew your certificates automatically before they expire. Since Let’s Encrypt certificates last for 90 days, it’s highly advisable to take advantage of this feature. You can test automatic renewal for your certificates by running this command:

sudo certbot renew --dry-run

Replace Default Apache Website

Step by Step instructions on replacing default Apache website with Custom page.

Now, after navigating to you’ll see Apache default website.

You can find Apache default index.html file in /var/www/html path.

    Apache2 Ubuntu Default Page: It works