How to Host a Website?
1. Install Apache
To install Apache, run the following commands:
sudo apt update
sudo apt install apache2
After installation, enter your IP address in a browser:
127.0.0.1:80
Or:
{ip}:80
Ensure you are not using HTTPS!
You should see a page like this:

2. Create Your Own Site
You have two options:
1. Edit the default site code that Apache provides (located at /var/www/html)
2. Create a separate site
This tutorial will guide you through the second option, as it is slightly more complex.
Create a new folder at /var/www/:
sudo mkdir /var/www/test/
Replace "test" with any name you prefer.
Create an index.html file:
nano /var/www/test/index.html
Add your website content to the file. For example:
Hello World!
Save the file. You might need to restart Apache using:
sudo service apache2 restart
Enjoy creating!