My Webserver Project

by: burt rosenberg
at: january 2026

Overview

The goals of this project is to exercise the student's skills in cloud computing, and to give an sense of the breath of skills the student will have by the conclusion of this course.

You will,

  1. Setup you github account and your git-csc424 directory on your computer.
  2. Clone the project as git-csc424/project1.
  3. Start you EC2 instance and ssh to it.
  4. Update, upgrade and install on the EC2 instace.
  5. Complete the webserver project as described belowl
  6. On your computer create the evidence.txt file and commit it.
  7. Stop (or terminate) your EC2 instance.

First activity: setup github and accept the project

  1. You have configured you git defaults.
    git config --global user.email __YourEmail__
    git config --global user.name __YourUserName__
    git config --list
    
  2. You have setup ssh authentication for git.
    - create an ssh key pair: ssh-keygen -t ed25519 -f id_ed25519_github
    - cut and past the public key id_ed25519_github.pub into your git hub account
    - place the private key id_ed25519_github in you ~/.ssh/ directory
    - make sure the permissions are 0600 on the key and 0700 on the .ssh directory
    - and set up in .ssh/config file the stanza
    
    Host github-rsa
    Hostname github.com
    User git
    IdentityFile ~/.ssh/id_ed25519_github
    
    - test with ssh -T github-rsa
    
  3. You have accepted the project and cloned it into you directory:
    git clone github-rsa:csc424-262/project1.git

Second activity: create your webserver

Read: for setting up AWS.
  1. Launch an Ubuntu EC2 Instance.
  2. Edit the security group to add http and https access in inbound rules (it already has ssh access).
  3. ssh into the instance using: make ssh H=_instance_public_IP_address_
  4. Update the packages index: sudo apt-get update and upgrade with sudo apt-get upgrade
  5. Install packages with:
    sudo apt-get install build-essential apache2.
  6. Locate your public IP (same IP as for ssh) and http://_that_address_ in a web browser.
  7. You should see the "It works!" page as shown in the image to the right. If not, find and fix the problem.

    Note: one problem you can have is your AWS SecurityGroup does not have an entry for allow HTTP source 0.0.0.0/0.

Third activity: make the webpage

Do the following on your EC2 instance.
  1. Create a non-default root directory for the webserver,
    cd /var/www/
    sudo mkdir ubuntu
    sudo chown ubuntu ubuntu
    
  2. Cut and paste the index.html found in the github repo to /var/www/ubuntu/.
  3. Edit the Apache2 configuration file,
    Edit the file /etc/apache2/sites-available/000-default.conf
       Replace: DocumentRoot /var/www/html
       With: DocumentRoot /var/www/ubuntu
    
  4. Reload the configuration of the apache2 server:
    sudo systemctl reload apache2
    
  5. Check the status of the apache2 server:
    sudo systemctl status apache2
    
  6. Refresh the browser and see the new index.html.
  7. Modify the web page to put your name and the date and check (no reload needed).

Fourth activity: git push the evidence

  1. This you do on your computer:
    make test H=_public_IP_address_
    git add evidence.txt
    git commit -m submission
    git push
    

But websites have names?

The IP address is what networking cares about, but most websites also have names. There is a Internet wide system called DNS (Domain Name Service) and answers queries for the IP address, given a name. It is a form of a database. For your website to have a name, you need to insert an entry into this database.

This is done in several steps. First you must own the name. That is done working trough a Registrar to put the database entry into a Registry. The organization ICANN (Internet Corporation for Assigned Names and Numbers) set things up this way to encourage market competition.

Once you own the name, you must find a server for the domain of you name, and have your name and IP address entered into their database. Now that server will respond to queries about the name, and return as the answer to the query the IP address.

According to class interest, we can walk through this process. But we will study DNS as a technology.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

author: burton rosenberg
created: 2 feb 2021
update: 20 jan 2026