In this tutorial, you will learn how to Install and Configure Apache Web Server in Ubuntu. Apache web server is a widely used open-source HTTP server for modern operating systems including UNIX and Windows.
How to install and configure the Apache web server in Ubuntu systems.
Step 1: Updating Repositories
You can download and update the latest repositories in ubuntu. Open the terminal or login using SSH and run the following command
sudo apt update
Step 2: Install Apache2
Run the following command to install the Apache webserver.
sudo apt install apache2
Step 3: Configure the Firewall
Skip this step if you are installing Apache on AWS EC2 instances. Run the following command to check the ufw application profiles
sudo ufw app list
Available applications: Apache Apache Full Apache Secure OpenSSH
Allow apache on ufw and verify the status
sudo ufw allow 'Apache'
once you run above command the system will show apache status ‘running’
Step 4: Verify the apache server is running
sudo systemctl status apache2
The status “active (running)” verifies that the apache2 service is running.
Step 5: Verify that Apache is running properly and listening to your IP address
Open your IP address in browser