Mastering the World-Wide Web

Spring `96 Assignment #2
Student Server Setup

Your overall goal for this assignment is to retrieve, install, configure and run an NCSA HTTPd server in your Burrow account. This is your student server -- it should be maintained throughout the course and it may be used for future assignments.

  1. Read the online documentation, tutorials, etc for NCSA HTTPd at
  2. Install and configure the latest version of NCSA HTTPd (version 1.5) to run out of your Burrow account on the host and port number assigned to you on the student servers page. Between the online documentation, the server installation procedure outlined in Chapter 3 of the text, and the knowledge that NCSA HTTPd 1.5 is already compiled on the Burrow (with sources in /l/src/httpd and executable in /usr/local/bin), you have a number of alternatives and instruction sets to go about this. If downloading software packages, eg, compressed tar archives, from the net is new to you, be sure to use this opportunity to do so with the HTTPd sources. If compiling programs from sources under Unix is new to you, do so with the HTTPd sources according to the instructions in the online documentation. Make sure to configure StartServers 1 and MaxServers 3 (or less) in httpd.conf as instructed in class. Also, use /u/USERNAME as your home directory instead of the output of pwd (eg, not /nfs/paca/home/user3/USERNAME).
  3. Create a minimal home page for your server. Make sure it's configured as the default root document. It should contain, at least and in easily found locations, your name, an image, and a link to the output (but not the source code) of the CGI script you'll write and install in a later step. The image may be a scanned photograph or camera snapshot of yourself, or any other substitute image which you choose to represent yourself. Cameras are available on the SGIs in the Ships cluster and scanners are available at a number of UCS consultant sites, including the basement of Lindley Hall. This image will be used to create a picon for you, if you don't already have one, and will be included in the imagemap on the student servers page.
  4. At this point, you may wish to start your server and test it out to make sure it works.
  5. Write a simple CGI script in Perl that will output a web page, like the haiku example, displaying the complete run environment of the script. Install this script on your server, link it into your server's home page, and test it out. Make sure to include these components of the environment: You should consult the Perl Reference Guide or the Perl man pages (man perl or online in the Perl resources) for more detailed information about any of these items, if the Learning Perl text doesn't cover them. Also, if your script output is in HTML, make sure to escape any special HTML characters in your text, eg:
    • s/&/&/g
    • s/</&lt;/g
    • s/>/&gt;/g
  6. Configure and install starthttpd in your home directory to use as a server start/restart/kill convenience command. Also, register a starthttpd command in your personal crontab to run at 15 minute intervals to ensure that your web server remains up at all times. Make sure your intervals aren't exactly on the quarter hours so that the machines don't experience a load spike every 15 minutes from everyone running their starthttpd's at the same time. Register a starthttpd -r command to run once a day to minimize the number of surplus servers you have running. See the man pages for crontab for complete information about crontabs. Kill any running server and restart one with starthttpd. Finally, use your script to make sure the CGI environment is exactly as you want it, configuring your starhttpd and your server configuration files as needed.
This assignment will be due Mon 12 Feb before 11:59pm. Nothing need be handed in -- it'll be graded as tested and viewed across the web. This does mean it's important to successfully implement the starthttpd crontab command to ensure that your server doesn't remain down without notice and is up when we visit to grade it.

<> 6 February 1996