To install Apache on Ubuntu 24.04

What is Apache2?
Apache2 (often just called Apache) is one of the most widely used open-source web server software.
- It was created by the Apache Software Foundation.
- On Ubuntu and Debian systems, the package name is
apache2
. - It runs on Linux, Windows, macOS, and more.
A web server like Apache is software that serves web pages to users’ browsers when they request them (by visiting a website).
Here Are the steps:-
1) Update system packages
#sudo apt update && sudo apt upgrade -y

2) Install Apache2 on ubuntu OS
#sudo apt-get install apache2 -y

3) Enable Apache2 to start on boot
#sudo systemctl enable apache2

4) Start Apache2 service
#sudo systemctl start apache2

5) Check Apache2 status
#sudo systemctl status apache2

Look for apache2 is active (running)
.
6. Allow Apache through firewall (if UFW is enabled)
- First you need to enable UFW (Firewall)
#sudo ufw enable > Press Yes

#sudo ufw allow ‘Apache Full’
#sudo ufw reload

7) Test Apache2 in your browser
Open your server’s IP in a browser:
#https://your-server-ip

You should see the Apache2 Ubuntu Default Page.
Thanks for watching….