Apache Web Server, also known as Apache HTTP Server, is a free and open source web server
It is good practice to update your package list to ensure you are installing the latest version available.
sudo apt update
Once the package list is updated, you can install the Apache package called apache2
sudo apt install apache2
Once the installation is complete, the Apache service will start automatically. You can check its status to ensure everything is working correctly.
sudo systemctl status apache2