Apache is one of the most widely used open-source web servers in the world. It is known for its stability, flexibility, and robust feature set, including support for dynamic modules, URL redirection, and integration with multiple technologies like PHP, MySQL, and SSL.
In this guide, we'll walk you through the steps to install Apache on a server running Ubuntu.
Step 1: Update System Packages
Before installing any new package, it's best practice to update your system repositories.
# sudo apt update

Step 2: Install Apache2
Install the Apache2 package using the apt package manager:
# sudo apt install apache2
Type Y and press Enter when prompted to confirm the installation.

Step 3: Check Apache Service Status
Once installed, ensure the Apache service is running properly:
# sudo systemctl status apache2

You should see an output indicating that the Apache service is active (running).
Step 4: Confirm Apache is Running in Browser
Open your browser and enter your server’s public IP address in the address bar:

You should see the default Apache landing page for Ubuntu, confirming that Apache is working correctly.
Conclusion:
You have successfully installed and started the Apache web server on your Ubuntu system. Apache is a robust, flexible, and widely used web server that can serve your websites and web applications efficiently.
With Apache installed, you can now host static and dynamic web content, configure virtual hosts to serve multiple sites from a single server, enable modules to extend Apache’s functionality, and secure your server with SSL/TLS certificates for HTTPS.