Apache Server Setup

Apache is a popular web server application you can install on the Raspberry Pi to allow it to serve web pages.

Install Apache

  1. Follow the commands

    sudo apt update
  2. Install the apache2 package with this command

    sudo apt install apache2 -y
  3. Test the Web Server

    #By default, Apache puts a test HTML file in the web folder Type http://localhost/ on your browser or type the Pi IP addresss itself http://192.168.1.10 (whatever the Pi's IP address is) in the browser
  4. Browse to the default web page either on the Pi or from another computer on the network and you should see the following

    This means you have Apache working!

  5. Once you have done that, let's go to the root folder

Once you have successfully configured this, you will need to add your Rumie project folder and the rumie.json file in the Apache web root which is /var/www/html

Upload Rumie and rumie.json to the web root

  1. First, let's create the rumie.json. Open any text editor and add this line into it

  2. Save the file as rumie.json. Save it on your Desktop or any other place where you can find it.

  3. Extract your Rumie Project and place the Rumie folder in the same location as the file.

  4. Now to transfer files to the Apache web root, we are currently working on a script to automate this process. For now, you would have to set it up manually.

  5. Please go to this following link and download WinSCP https://ninite.com/

  6. Select the WinSCP from the many options and select “Download your Ninite”

  7. Click on the executable file and install the software. Once it is complete you will have to launch it

     

  8. In the Hostname field give the IP address for the Raspberry Pi that you are already connected to via SSH. Also, enter the username and password. The password you will use this time is going to be the updated one and not the default.

  9. Select “Login” and you will be able to access directories on the Pi

  10. Select “Yes” to the Warning popup and continue

  11. Once connected you will be able to access files on your local laptop and on the Pi

  12. Select the location where you have saved the Rumie project and the rumie.json

  13. Select this path for the Pi → /<root>/var/www/html

     

  14. Just select the Rumie folder and place it under index.html. Depending on the size of your project, it will take a couple of minutes to transfer this Rumie folder

  15. Repeat the step with the rumie.json file. Select it and place it under index.html.

  16. Once you have completed your view should look like this

     

  17. So now if you check your terminal which is connected to the Pi, and you go to the root directory you will see the files listed there

 

So now you have completed the second step! You have set up the Apache server and also uploaded your Rumie project and rumie.json to the web root. The only step left is to configure the Access point for the Pi

 

Continue to Part 3 (Access Point Setup)

 

The Rumie Initiative