CS552 Assignment 1 (easy)

Your first assignment is to compile (build) the apache server from source code and install it under cs552/apache in your home directory (using the --prefix=$HOME/cs552/apache option to configure). Specifically, by midnight next Tuesday (April 3), you need to:

Check near the end of this document for handin procedure. In three weeks' time, you must:

Hints

Just to make things interesting, and to keep you from using too much disk space, you may not do the compile in your home directory. You'll do it in /tmp/username, where username is your user name (Yes, you'll have to use mkdir to create this directory.).

Just a reminder:
./configure prepares the build of the software.
make builds it.
make install installs it under the configuration prefix.

You don't need to download the apache server source code; it's in /home/bri. You also don't need to copy and gunzip it to extract it. Hint:

zcat file.tar.gz | tar xvf -
Another thing: don't print out the apache manuals. Get used to looking at everything online. It's a million times better this way, not only because you can search for stuff, but because the parameters change all the time. Change your browser or xterm font size if you need to.

Now, go into the conf directory that you just installed (in your home directory, remember the --prefix option to gave to configure?). There are a few things in that httpd.conf file you need to take care of. You're probably going to need to change the ServerRoot, DocumentRoot, and Port parameters. It should be pretty obvious how you need to set the first two. The latter should be a number bigger than 1024, because you're not allowed to listen on a port lower than 1024 if you're not root on a Unix machine.

You must also change LockFile, because it doesn't work on an NFS filesystem. Change it to /tmp/httpl-username, where username is your login name on our system.

Now start up the http that you compiled and installed. Test it with your web browser (remember http://server:port/ that we talked about?)

The last thing before you hand in this stage is to find and limit the number of web server processes as described above. Those are parameters in httpd.conf; just read over that file until you find them.

After you make a new welcome page, you're ready to turn this assignment in. Send your name and the base URL of your web server to cs552-handin@cs.uchicago.edu. Don't send anything else.

There's a second part to this assignment that you need to have done within three weeks. People reboot our machines all the time. Write a cron job that checks to see if your server's running, and if it's not, start it up again. This time, use the apachectl script that gets installed with apache to do the work for you.

You may also consult with other people in the class about this part. But to those being consulted: Make 'em figure a reasonable amount out for themselves.