Apache is a popular web server application you can install on the Raspberry Pi to allow it to serve web pages.
Install Apache
Follow the commands
sudo apt update
Install the
apache2
package with this commandsudo apt install apache2 -y
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
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!
Once you have done that, let's go to the root folder
# /var/www/html -> web root #here we will see the index.html that is being displaced on our browser #we need to give read, write and executable permissions to this root folder to perform further steps sudo chmod a+rwx /var/www/html
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
First, let's create the rumie.json. Open any text editor and add this line into it
{"status":"Connected to Rumie Web Server"}
Save the file as rumie.json. Save it on your Desktop or any other place where you can find it.
Extract your Rumie Project and place the Rumie folder in the same location as the file.
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.
Please go to this following link and download WinSCP https://ninite.com/
Select the WinSCP from the many options and select “Download your Ninite”
Click on the executable file and install the software. Once it is complete you will have to launch it
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.
Select “Login” and you will be able to access directories on the Pi
Select “Yes” to the Warning popup and continue
Once connected you will be able to access files on your local laptop and on the Pi
Select the location where you have saved the Rumie project and the rumie.json
Select this path for the Pi → /<root>/var/www/html
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
Repeat the step with the rumie.json file. Select it and place it under index.html.
Once you have completed your view should look like this
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
cd /var/www/html ls -l #your output will be similar to this total 20 -rw-r--r-- 1 root root 10701 Mar 25 19:22 index.html drwxr-xr-x 5 pi pi 4096 Mar 25 19:36 Rumie -rw-r--r-- 1 pi pi 42 Mar 25 19:06 rumie.json
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 2 (Access Point Setup)