Web Hosting

Raspberry Pi (Setup)

In Terminal, which is:

In Terminal enter:

sudo apt-get install apache2 -y

Once that is done enter this:

sudo chown -R pi /var/www/html

This makes your user (pi) own the folder that the HTML files need to go into. Open ‘File Manager’ which is one left of Terminal.

In the box that says /home/pi click on it and remove /home/pi and replace it with /var/www/html and press enter. Right click on index.html and press Geany Programmer’s Editor.

Select all the text and press backspace. Press save:

Press the small arrow pointing down in the top right hand corner to minimise the editor.

Right click on the html.html file you made last week and press Geany Programmer’s Editor. Select the code and press CTRL+C or Right click then copy. Click on index.html that is next to html.html on the screen.

Click CTRL+V or Right Click then Paste. Press the save button like you did earlier.

Open Terminal and enter:

hostname -I

A number will come up. If you are using Ethernet two number will come up. Copy one. Open Chromium which is next to File Manager. Paste the number into the search bar and your site will appear. Here’s ours:

You can put the number (with the dots) into any device on your WI-FI network.

Thats it for this week!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.