Here's an optimized version of your article for an FAQ knowledge base:
Follow these steps to install and verify the Apache web server on Ubuntu.
Before installation, update your system's package list:
sudo apt update
Run the following command to install Apache:
sudo apt install apache2 -y
Check if Apache is running with:
sudo systemctl status apache2
If it’s active, the installation was successful.
Open a browser and enter your server’s IP address:
http://server_IP_address
You should see the default Ubuntu Apache page, confirming that Apache is working correctly.
Q: How do I restart Apache?
A: Use this command:
sudo systemctl restart apache2
Q: How do I enable Apache to start on boot?
A: Run:
sudo systemctl enable apache2
Q: How do I check which Apache version is installed?
A: Use:
apache2 -v
Following these steps, you can easily install and verify Apache on Ubuntu.