Apache HTTP server is the most popular web server. It is a free, open-source and cross-platform HTTP server.
This tutorial explains how to install and manage the Apache server on Ubuntu 18.04.
In order to complete this tutorial, you will need :
- you will need to have an Ubuntu 18.04 server.
- Update your system:
sudo apt update && sudo apt upgrade
3. Install Apache
Apache2 is available in the default Ubuntu repositories so we can use
apt package management tool to install it with the following commands.
sudo apt update && sudo apt install apache2
Apache is installed and automatically started, you can check the Apache service status by using :
sudo systemctl status apache2
4. Adjust the Firewall
If firewall i used, you’ll need to open HTTP (
80) and HTTPS (
Assuming you are using
UFW to manage your firewall, you can open the necessary ports with the following command:
sudo ufw allow 'Apache Full'
You can verify the change with:
sudo ufw status
Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere Apache Full ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6) Apache Full (v6) ALLOW Anywhere (v6)
5. Verifying the Apache Installation
To verify that everything works correctly, you can type your server IP address
http://YOUR_IP_OR_DOMAIN/ in your browse and you will see the default Ubuntu 18.04 Apache welcome page.