Modifying Apache2 Raspberry Pi Webpage




100 Points
Learning Objectives

These instructions will show you how to modify a webpage on a Raspberry Pi.

More information on Apache is available online.
Being able to use this software will greatly simplify working with the Raspberry Pi to learn how websites work.

After completing this assignment you will be able to:

  1. Run Apache2
  2. Find and edit a website file served by Apache2
  3. View other's websites on your laptop

Assignment Overview
This assignment reviews basic computer concepts that you will need in this course and throughout your career.

You are expected to have a working knowledge of SBC hardware and software.
If you do not understand how to use an item, perform a Google Search, refer to the WSU Technology Knowledge Base,  ask a teaching assistant, or ask the instructor.


Exercise 1-Modify Webpage
  1. These steps are performed on the Raspberry Pi.
  2. Using the File Manager, locate the file: 'homepage.html' in the folder '/var/www/html'
  3. In the terminal window modify the homepage.html file:
    cd Desktop then press Enter
    sudo nano homepage.htmlthen press Enter, and you are in superuser(su) edit mode
  4. Add your name to the webpage by inserting this html code after the opening <body> tag:
     <h1>Enter Your Name Here</h1>
  5. edit homepageEdit Homepage

  6. Press the 'Ctrl+X' keys, then press 'y' and then press 'Enter'
    In the 'File Name to Write' row, enter
    /var/www/html/homepage2.html
    and then press enter.
    When asked to save file under a different name, press 'y'

Exercise 2-View Another's Webpage
  1. These steps are performed on your laptop.
  2. Choose a partner in the class.
  3. Exchange your Raspberry Pi IP address with your partner.
  4. Open a browser window on your laptop and enter your partner's Raspberry Pi IP address to bring up their 'homepage2.html'

    Partner HomepagePartner Homepage


Exercise 3-ScreenShot

Take a screenshot with Apache2 running and displaying your partner's 'homepage2.html' to document your work.
Note: this can be done using the Snipping Tool if you are running VNC, or use the scrot command if you are connected to the Raspberry Pi with a keyboard and mouse.

  1. Take a screenshot.
  2. If on your laptop you may want to save the screenshot as "IOT03" in your ' ' folder.

ScreenShot IOT03


Upload Screenshot

Upload a screenshot that documents your work to the appropriate D2L Assignment folder.


(50) 1. Upload your screenshot to the 'IOT03' D2L Assignment Folder.


Exercise 4-Reflections

Based on your experience in this exercise, consider the value of an Apache2 web server platform for organizations.
Think about what type of problems these devices could solve, and whether it could be cost-effective.
Businesses are deploying IoT 'solutions'-how can Apache2 equipped Raspberry Pis support or automate these efforts?

References:
Apache2: Apache
PiMyLifeUp Apache2 Article
W3Schools HTML

 

(20) 2. Reflections-value
List a specific problem that a low-cost webserver could be used for.


(20) 3. Reflections-content
Research the internet to find a company or product that is addressing your problem, using IoT technology.


Submit Assignment

When all tasks are completed press the Submit button.


(10) 4. Assignment submission



Congratulations! You have successfully modified a web page, on a Raspberry Pi Apache2 web server.


-- WHEN DONE --
SHUTDOWN THE RASPBERRY PI
TURN OFF THE POWER