How to install the Apache Web Server on Ubuntu 20.04

Apache is open-source and most widely used web server in the world. It provides dynamic modules, and powerful support to website.

In this article, we will go through on how to install Apache web server in your Ubuntu 20.04 system.

Prerequisites:

You should have non-root user account logged in with sudo privileges to install Apache server.

Install apache2 server

Apache is already included in Ubuntu's repository, So you can directly install apache server from the Terminal command.

First update the repository index with bellow command.

sudo apt-get update

Install Apache server:

sudo apt-get install apache2

Configure apache server

First check the Apache in ufw application list.

sudo ufw app list

And allow the Apache server

sudo ufw allow 'Apache'

You can also check the ufw status

sudo ufw status

Apache server status

You can check the apache server status with the command:

sudo systemctl status apache2

Start the Apache server

sudo service apache2 start

Or stop the server

sudo service apache2 stop

This way, you can also restart the server

sudo service apache2 restart

This way you can setup your Apache to your server. If you have any suggestions or query, please let us know in the bellow comment section.