Apache is a free and opensource web server in the world, It gives numerous incredible highlights including powerfully loadable modules, strong media uphold, and broad incorporation with other mainstream programming.
In this post, We will install and configure Apache2 on ubuntu 22.04 LTS
You need to update the ubuntu current repository by using the command.
sudo apt-get update
You need to execute the given command for the same.
sudo apt-get install apache2 -y
You need to use the systemctl command to get installed apache2 service status by using the command.
To get service status
sudo systemctl status apache2
To get service start
sudo systemctl start apache2
To get service stop
sudo systemctl stop apache2
To get service start on boot
sudo systemctl enable apache2
To get service stop on boot
sudo systemctl disable apache2
Now we are ready to open the port 80 to get the apache test page in browser use the following command for the same.
sudo ufw status
sudo ufw allow 80
We have successfully install and configure the Apache2 web server in our Ubuntu 22.04 server.