ICT336 title
Murdoch University logo

Assignment 1


Part I: Apache web server installation, configuration and administration

  1. Set-up and maintain an Apache web server with the following functionalities:
    1. The server must execute and have all the functionalities available by default installation.
    2. There must be a restricted-access directory called "restricted" on the top level of the server's web-site. Access to this directory and any of its sub- directories is only allowed to those who supply valid usernames and passwords.
    3. The server must log all requests from clients. The log entries should only include the time the requests were made, what browser made the request (if possible), and status code of the response, in that order.
    4. The web site is able to support server-side include files with the extension ".shtml".
    5. The server will redirect all access to files with the extension .336 to the main page of the ICT336 unit web site http://www.it.murdoch.edu.au/units/ICT336.

     

  2. Submit a description of no more than 3 pages to demonstrate that you can apply your knowledge of configuring and administrating a web server to an organisation. You may choose any organisation you wish, or even make up an organisation of your own.

    Your description must include:
    1. Details of the organisation (eg. organisational structure, what they use the web for, etc) that are relevant to the configuration and administration of the web server.
    2. How you would configure and administrate the web server to fit the organisation's needs. Emphasize issues relating to the web server rather than web-site content issues. Emphasize technical configuration and administration issues rather than non-technical ones like pricing, budgets, etc.

    Some suggestions of organisations you can use include Murdoch University, the School of IT, your own family business, the company you work for, and community/sporting/cultural group you belong to. You may look up organisations with web sites and use one of them. You may make up an organisation with your own imaginary details. The actual details themselves are not important - the point is to demonstate that you know what criteria to consider and how to use those criteria to make sound technical decisions.

Part II: Implement a Web Client

Complete the following:

  1. Implement a perl web client named webclient.pl that supports basic HTTP communication with a web server. Your client should accept a URL as a parameter. For example:

    webclient.pl http://www.murdoch.edu.au

    The client should retrieve the resource specified by the URL using the "GET" method. The client should display the whole response (status line + headers + content) on standard output, regardless of whether the retrieval succeeded or not.

    The behaviour of your web client when no parameter is given is unspecified. You may implement anything you believe appropriate. This behaviour will not be assessed.

     

  2. Add to your web client in Part II (1) by including support for URL rewriting. If the URL supplied as a parameter does not start with the form "<scheme>://", then your client should assume the scheme is HTTP and prefix the supplied URL with the string "http://" before further processing. The subsequent behavior of the client should be the same as in Part II (1).

    For example, the following command

    webclient.pl www.murdoch.edu.au

    should give the same result as

    webclient.pl http://www.murdoch.edu.au

     

  3. Add to your web client in Part II (1) by including support for simple filtering.
    1. Before retrieving a web resource, your web client should determine if the URL string contains the substring "xxx". If the URL contains the substring, then your web client should not retrieve the resource, and instead print the following error message:

      webclient.pl: Resource not retrieved.

      If the URL does not contain the substring, then your web client should retrieve the URL as specified in Part II (1).

       

    2. After retrieving a web resource, your web client should determine if the value in the "Title" header contains the substring "xxx". If the Title header value contains the substring, then your web client should not display the contents of the resource, and instead print the following error message:

      webclient.pl: Resource not displayed.

      If the Title header value does not contain the filter string, then your web client should display the results as specified in Part II (1).

       

    3. Add to your web client in (i) and (ii) by extending the filtering to include arbitrary strings besides "xxx". Your web client should read arbitrary strings from a filter list file named "filter.txt" in the current directory. The strings are delimited by whitespaces, tabs or new-lines. Therefore, there may be more than one line in the file, and there may be one than one string in a single line.

      Here is an example filter.txt file. Note that this is only an example. Your script will be tested with other example files.

      Besides the source of the filter strings, your web client should behave exactly the same as in (i) and (ii).

      You do not need to submit different scripts for this requirement and requirements (i) and (ii). Completing this requirement means you will get the marks for (i) and (ii).

       

    4. Add to your web client in (iii) by extending the filtering to include the ability to read online filter lists. If your web client encounters a string in the filter.txt file that begins with "http://" then it should consider this to be a URL, and retrieve the resource specifield by this URL. The content of this resource is again a file of strings in exactly the same format as the filter.txt file. Your web client should process this filter string file the same as in (iii).

      After processing this online filter list, your web client should continue reading and processing the other entries in the filter.txt file.

      There may be more than one online filter list URL in the filter.txt file. An online filter list can again contain more online filter lists. If your web client failed to retrieve any given online list, it should stop execution with the error message:

      webclient.pl: Filter list <URL> not found.

      where <URL> is the URL it failed to retrieve.

      Your web client do not need to handle circular references, where online lists refer to themselves or to each other in ways that makes your web client stuck in a infinite processing loop.

      Here is an example filter.txt file containing online filter lists. Note that this is only an example. Your script will be tested with other example files.

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.

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

Part III: Implement a Web Server

Complete the following:

  1. Implement a web server in perl called webserver.pl which is able to handle HTTP requests from any standard web client, and return the requested resource (your server will be tested on serving plain text, HTML, and GIF images). Your server can accept one optional parameter corresponding to the port number to use. Your server should use port 8080 if no parameter is supplied. Your server should support the GET and HEAD methods defined by HTTP. 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.

     

  2. Add to your web server in Part III (1) by supporting the standard HTTP method called OPTIONS. When your server receives a request with the OPTIONS method, it should send back a response with header "Allow". The values of the "Allow" header should be comma-delimited strings corresponding to the HTTP methods supported by your server. For example:

    Allow: GET, HEAD, OPTIONS

    The status code of the response should be "200 OK". Your server should ignore the resource part of the request line in the request (it should not sent back an error status code if the resource is not available).

    [Note: OPTIONS is an official HTTP1.1 method.]

     

  3. Add to your web server in Part III (1) by supporting the standard 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".

    [Note: TRACE is an official HTTP1.1 method.]
    [Note: Completing this requirement may involve minor changes to your solution in Part III (2).]

     

  4. Add to your web server in Part III (1) to support for a simple URL redirection. If the server receives a request for files with the extension .336, then it should send a response to the client with the status code "301 Moved Permanently". The "Location" header of the response should have the value of the URL for the main page of the ICT336 unit web site http://www.it.murdoch.edu.au/units/ICT336.

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.

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

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%)

Marks Breakdown

Here is a link to a description of how the marks will be broken down.

Submission Checklist

Your submission should include the following:

  1. ICT336 Assignment Cover Sheet. All submissions (Internal and External on all campuses) must include this cover sheet. External students must complete this assignment sheet as well as the cover sheet sent to you by the External Studies Office.
  2. A statement of what you have completed - this is essential. Functionalities not stated as completed will not be assessed. Incomplete functionalities misleadingly stated as complete will incur heavy penalities.
  3. Part I:
    • A working version of the Apache web server installed in and run from your home area on this unit's Unix server. Although having a full web site is not necessary in this assignment, you need to include enough example files (such as .html and .shtml files) in your directories to demonstrate that the requirements are satisfied.
      Do not to have a server daemon running at all times. You will be notified when you need to turn on your server to have it assessed.
    • Copies of your configuration files submitted on floppy disk.
    • A print-out of (only) the sections in the server configuration files that you have modified, with comments.
    • A description satisfying question 2 of no more than 3 pages.
  4. Parts II & III:
    • Copies of your scripts submitted on floppy disk, AND residing in your home area on the unit's Unix server. Please ensure that the names of your scripts and text files are exactly as stated in the descriptions above.
    • A print-out of the source code for your scripts.
  5. Part IV:
    • A print-out of your plans and evaluation of plans.

Submission Dates

See Study Schedule page.

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.

Errata

This page is subject to change based on errors found. Any errors found and corrected will be posted as "Announcements" in the unit's discussion forum. If you print out a copy of this page, please follow the developments in that group for corrections.


Document author: H.L. Hiew, Unit Coordinator
Last Modified: Wednesday, 14-Apr-2004 21:11:25 MST
Disclaimer & Copyright Notice © 2004 Murdoch University
This document is relevant for semester 1, 2004 only