tux penguin

Installing Apache 2 web server

To turn your computer into a web server you need to install an HTTP server. A popular free web server is the Apache HTTP server. This can be installed using:
sudo apt-get install apache2
This will be sufficient to display a website based on HTML and Javascript but with no content dynamicially generated by the server.

You can verify that the Apache web server is running by pointing a web browser installed on your computer to 127.0.0.1.
You should see this text displayed:

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

To have your own opening web page displayed instead, replace the index.html file with your own index.html file.
On Linux this should be found in one of these locations:

Home page