Viewable With Any Browser


Todays date:
Monday 27th of May 2024 08:01:58 PM

You are visitor


Your IP address is

Page last updated
25 May 2017

installing a web server

Users     As we said on the previous pages, our intention was to use our Raspberry Pi as a low cost, low power web server.

We will install the apache web server to host our pages.

installing Apache

Login to the Pi console as user pi. Then type:

sudo apt-get install apache2

Allow that to install, then type:


Look for the first reference to 'inet addr:'

Make a note of the IP address. In our case this was ''.

Type the IP address into the search bar of a web browser.

If all went well, you should see the Apache2 Debian Default Page.


We also use php to take care of some oth the backend coding on our pages.

sudo apt-get install php5

Then we create test.php to test if its all working so far.
sudo nano /var/www/html/test.php

Add the following three lines to the script:

CTRL + X to save

Go to a web browser and in the search bar, type:


You should see the php page.

We also need to add php-mysql for our hitcounters to work:

sudo apt-get install php5-mysql

That's as far as we have got so far. Our web server is back up.

We will stop working on this, and try to fix ou MQTT server, which was just about running when the server crashed.