Spring `96 Assignment #2
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.
Student Server Setup
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
- Read the online
documentation, tutorials, etc for NCSA HTTPd at
- 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
MaxServers 3 (or less) in
instructed in class. Also, use
as your home directory instead of the output of
- 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.
- At this point, you may wish to start your server
and test it out to make sure it works.
- 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 (
- Program invocation information (
Be sure to print out the arguments in a way that distinguishes
between, eg, a single argument containing whitespace and multiple
arguments displayed with whitespace between them.
- The current working directory (
- The umask value in octal (
- The real and effective user and groups (
Be sure to print out both the user/group numbers and the
user/group names. Note that a group variable value is actually
a string of space-separated GIDs.
- All the environment variables (
sort functions can come
in handy here.
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
- 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
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
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.
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