Montana Tech of The University of Montana
Computer Science & Software Engineering

CSCI 470
Web Science
Spring 2012


Assignment #1
Due: start of class, Monday 9/23.

You will be building a web server using Ubuntu and Apache.
You will be learning to create a dynamic web application using CGI.


Part 1. You will be creating your own personal web server for use during the course. At least right now, the computers in the networking lab have no Internet connectivity. Thus we will do things the old-fashioned way, building from the source code! Part 2. One way a web server can provide dynamic content is by shelling out to an external program or script via CGI. You will be creating a simple web application that can store name/value pairs. The pairs are associated with a particular filename. You can store the pairs in the file in any way you like so long as it behaves as specified below.

You need to create two HTML pages get.html and set.html. The get.html page works as follows: The set.html page works as follows: Your can use any language you like, though if you want to use something besides C, Python or Perl you'll need to install it. Here is a skeleton CGI program in C that shows how to obtain the query string and output a page. It also has a couple helper functions for parsing out parameter values from the string.

Part 3. Benchmark your CGI program using the Apache benchmark utility ab. The utility is located in /usr/local/apache2/bin. Type ab with no arguments to get a list of its features.

Complete this readme.txt file with the requests per second you measure using ab connecting locally to your server (that is using the base URL http://127.0.0.1).
Submission. I will be testing your application by logging into your sever, starting Apache and then going to the get and set pages. You should also submit your CGI program source code, get.html, set.html and readme.txt to the Moodle dropbox. The Moodle timestamp is the completion time for the assignment.

Page last updated: August 16, 2012.  Copyright © 2011 by Keith Vertanen.