B336 title
Murdoch University logo

Assignment 1


Part I: Apache web server configuration and administration (20%)

Your task is to set-up a operating version of the Apache web server. Your web server should support:

  1. An access log file that logs only the following information on all accesses: the time and date of the access, the IP address of the remote host, and the request line of the request. (7%)
  2. A restricted-access directory named "secure", which can only be accessed using a username and password of your choosing. (7%)

You are also required to test your server's performance by running a few test requests to your server and monitoring its activities. (6%)

Submission requirements:

    1. An working version of the Apache web server configured to do the above, installed in and run from your home area on dijkstra.murdoch.edu.au. Also include example files (such as HTML files) in your directories to demonstrate that the requirements are satisfied.
      You should only have the executables and the configuration files in your directory. Only start the server when you need it. To save memory, do not to have a server daemon running at all times.
    2. A print-out of the sections in the server configuration files that you have modified, with comments on what and why you changed the sections.
    3. A one page report on tests done with your server to monitor its performance. You must include in your report what you did for your tests. You may include extra appendices (such as test result print-outs) to support your reports, but the appendices will not be assessed.
    4. A statement of which requirement is completed.
    5. Cover sheet (you only need one for this whole assignment if you are submitting everything as a single document).

Part II: Implement a Web Client (30%)

Implement a web client which is able to retrieve standard static resources from any web server (your client will be tested on retrieving plain text files, HTML files, and GIF images). The web client only needs to print out the headers and contents of the response it receives on the command line - graphical displays is not necessary.

You web client should support the following:

  1. Command line options for the user to specify whether to display the retrieved headers only, the retrieve resource file only, or both. (5%)
  2. Add another option for the user to specify that all requested files should be saved locally (local caching). If the user uses this option, then your web client should save the content retrieved in a local file, with the URL as the filename. For all invalid filename characters in the URL, such as ":" and "/", replace them with the character "#". Also, keep a log file of the URLs requested. (10%)
  3. When a new request to a URL is made, search through the log file implemented in (2). If there is a previous request to the same URL, then retrieve the saved file instead of getting a fresh copy from the Web. Assume the information you save will not go out of date, so you do not have to implement time-outs on the saved data. (10%)

Your source code will be assessed. Read the "Source Code" section of this link to guidelines for programming for a description on what to consider when writing code. (5%)

You may use and modify the example Perl code given in lectures, labs and the unit reader, with appropriate acknowledgements in your submission. The code you borrowed from these sources will not be assessed, only the sections you add or modify.

Submission requirements:

    1. Copies of your scripts submitted on floppy disk, AND residing in your home area on dijkstra.murdoch.edu.au.
    2. A print-out of the source code for your scripts.
    3. A statement of which requirements are completed.
    4. Cover sheet (you only need one for this whole assignment if you are submitting everything as a single document).

Part III: Implement a Web Server (45%)

Implement a web server which is able to handle HTTP requests from any standard web browser, and return the requested resource (your server will be tested on serving plain text, HTML, and GIF images). Your server should support the GET and HEAD methods defined by HTTP versions 1.0 and 1.1. You server must also respond with the error responses if it encounters the following situations:

  1. Request is not a valid HTTP request.
  2. The URL is not found.
  3. The URL has moved to a new location.

In addition, you should also include the following support in your server:

  1. Implement an HTTP method called OPTIONS. When your server receives a request with the OPTIONS method, it should send back a response with one (and only) header "Allow". The values of the "Allow" header should be comma-delimited strings corresponding to the HTTP methods supported by your server. The status code of the response should be "200 OK". (10%)
  2. Implement an HTTP method called TRACE. When your server receives a request with the TRACE method, it should send back to the client the whole request message received (ie. request line + headers + message body) in the message body of the response. The status code of the response should be "200 OK", and the content-type header of the response should have the value "message/http". (15%)
  3. Implement a simple "server-side include" language for your web server. If your server receives a request for a file with extension .shtml, then it should parse the file and look for comment lines of the form <!-- $VAR -->, replace the comment lines with what is specified by $VAR, and return the file to the client with those lines replaced. The file should be sent by your web server as HTTP content-type value "text/html".
    The The following are valid variables to replace:
    • $DATE_LOCAL - current date and time.
    • $LAST_MODIFIED - date and time the requested file was last modified.
    • $UNDER_CONSTRUCTION - a GIF image of a construction sign.
    If the variable in the comment is not one of the above, then leave the comment line as it is.
    (15%)

Your source code will be assessed. Read the "Source Code" section of this link to guidelines for programming for a description on what to consider when writing code. (5%)

You may use and modify the example Perl code given in lectures, labs and the unit reader, with appropriate acknowledgements in your submission. The code you borrowed from these sources will not be assessed, only the sections you add or modify. Note that there is an example web server given in lectures, labs and the unit reader that already satisfies requirements 1-3 of this part III.

Submission requirements:

    1. Copies of your scripts submitted on floppy disk, AND residing in your home area on dijkstra.murdoch.edu.au.
    2. A print-out of the source code for your scripts.
    3. A statement of which requirements are completed.
    4. Cover sheet (you only need one for this whole assignment if you are submitting everything as a single document).

Part IV: Learning to Learn (5%)

Read the Learning to Learn document, and complete the information in the two forms:

  1. Plans. (2%)
  2. Evaluation of plans and methods. (3%)

Submission Dates

Submit a copy of your plans (part IV a) directly to your tutor before or during week 4. Internal students may do so during your lab sessions. External students may email a copy directly to your tutor. External students should ensure you receive and save the email message sent by your tutor acknowledging he/she has received your assignment.

The whole assignment (including part IV a) is due at 4pm Friday 5th April 2002 (week 6). Internal students must submit their assignments to the School of IT's assignment boxes. External students must submit through the External Studies Office.

Learning Objectives:

As with all assignments, this assignment is to assess how well you have achieved the unit's learning objectives. This assignment is principally focused Learning Objectives 1 (understanding technologies), 2 (writing software) and 3 (constructing solutions). Part IV is to assess your progress in Learning Objective 4 (self-learning). To do well in this assignment, you will need to show good performance in these objectives.

Notes

Some hints on solutions to part II is available by looking at solutions to last year's assignment 1 in this unit.

The marks for requirement 6 in part III of this assignment does not reflect the workload required to complete it. Eventhough the requirement is only worth 15% of this assignment, if you choose to tackle it, it will probably take more than 15% of the time you devote to this assignment.

These special requirements are there for the highly-motivated students who wishes to push themselves with challenges, and strive for the highest possible grade. The reason for the relatively low marks allocated it is to not severely disadvantage students who may only wish to pass this unit. As with all other assessments in this unit, students who follow and understand the unit materials and put in a decent effort on the assignments will find it relatively straight-forward to pass. But to gain a distinction/high-distinction would require exception quality and effort in the work submitted.


Document author: H.L. Hiew, Unit Coordinator
Last Modified: Sunday, 02-Mar-2003 09:30:24 MST
Disclaimer & Copyright Notice © 2002 Murdoch University
This document is relevant for semester 1, 2002 only