By June Teh
I made a local webserver using a raspberry pi for my project. I also recorded a video to show you how it functions. I hope you like it!
Materials and applications:
Raspberry Pi 4B + powercable
Linux
Lighttpd
VS Code
Wifi
Herotofu
ImgBB
To start, I created a WIFI configuration file and transferred it directly to the SD card. This way, whenever your raspberry pi is powered on, it will automatically connect to the internet, thus allowing remote access to the raspberry pi. Here's a link demonstrating a few ways to do that. You can even connect it to your mobile hotspot! Remote access - Raspberry Pi Documentation
To run a web server on Raspberry Pi, I installed Lighttpd:
sudo apt install lighttpd
All my HTML and CSS coding was done on the VS Code program first. Once I have finished my code, I copy it to my Raspberry Pi via remote access on Linux. The files are created via nano note, for instance, the homepage of my website I named it "index.html" therefore:
sudo nano /var/www/html/index.html
Additional few features I created for this project include:
✅ Collect submissions via third party (i.e. Herotofu) and receive notification of new incoming submission via email
✅ Direct link to social media
✅ Direct link to a private google drive folder to access large files
✅ Interactive popping bubble wrap
✅I uploaded all the images (even gifs) to the webserver as cloud links instead of files. For this project, I went with ImgBB, an image hosting cloud server, because some files can be pretty large and slow down the memory and loading speed.
This webserver is only accessible locally, meaning you can only access the website if the Raspberry Pi is up and running and you know its IP address, e.g. "https://192.168.1.42/index.html".