Step 1: Install Apache

Apache is available within Ubuntu’s default software repositories, so we will install it using conventional package management tools


CMD: sudo apt-get update

CMD: sudo apt-get install apache2

Step 2: Adjust the Firewall

We can list the ufw application profiles by typing:

CMD:sudo ufw app list

You should get a listing of the application profiles:


Available applications:
Apache Full
Apache Secure

we will allow incoming traffic for the Apache Full profile by typing:

sudo ufw allow ‘Apache Full’

Step 3: Check your Web Server

CMD: sudo systemctl status apache2

CMD: hostname -I

When you have your server’s IP address or domain, enter it into your browser’s address bar: