How to install Apache on ubuntu 22.04

What is apache2?
Apache2 (often just called Apache) is one of the most widely used open-source web server software.
Apache2 (commonly known as Apache) is one of the most popular free and open-source web server programs.
It is developed and maintained by the Apache Software Foundation.
On Debian-based systems such as Ubuntu, the package is named apache2.
Apache works across multiple operating systems including Linux, Windows, and macOS.
In simple terms, a web server like Apache is software that delivers websites to visitors’ browsers when they type in a domain or make a request.
Here Are the steps:-
1) Update system packages
#sudo apt update && sudo apt upgrade -y

2) Install apache2 on ubuntu 22.04 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 web browser (Like Chrome or Mozila Firefox)
Open your server’s IP in a browser:
#https://your-server-ip

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