To install Apache2 on Debian Linux, follow these steps:
1 Open a terminal window.
2 Update the package list by running the following command:
sudo apt-get update
3 Install the Apache2 package by running the following command:
sudo apt-get install apache2
4 After the installation is complete, start the Apache2 service by running the following command:
sudo systemctl start apache2
5 To check the status of the Apache2 service, run the following command:
sudo systemctl status apache2
6 If you want Apache2 to start automatically when the system boots up, run the following command:
sudo systemctl enable apache2
7 Finally, to verify that Apache2 is working correctly, open a web browser and enter your server’s IP address or domain name in the address bar. You should see the Apache2 default web page.
That’s it! You have successfully installed Apache2 on Debian Linux.
The default web page for Apache2 on Debian Linux is located at
/var/www/html/index.html. This is the file that is served when you access your server’s IP address or domain name in a web browser after installing Apache2.