CS6204: Web Server Installation Project

(Version 3 [Changes are in this font color.])

Northern Virginia studentsPlease try this assignment before the next class meeting (11/16/96). When we meet in class I can then help you with problems that you encounter in completing the assignment.

For 10% of your course grade, install the NCSA httpd server on actor.cs.vt.edu in your home directory. (You can use another Web server if you can accomplish all of the requirements below.) Refer to pages 66-95 of the Lincoln Stein's How to Set Up and Maintain a World Wide Web Server for help to complete this assignment.

Note that actor.cs.vt.edu runs Sun Solaris 2.4. There is a precompiled binary for the httpd server available from NCSA (httpd_1.5.2a-export.tar.Z), so you don't have to compile the code!

Please create a directory called "httpd" in your home directory on actor. This directory should be the ServerRoot in the http.conf configuration file.

Important Warning

When you start your server on actor.cs.vt.edu (by typing the command "httpd -d <your-server-root>"), five processes will be invisibly spawned in the background. To see them, type the command "/usr/ucb/ps -x". For example, when I do this I get

actor:abrams[130] ps -x
   PID TT       S  TIME COMMAND
 23479 ?        S  0:00 httpd -d /home/abrams/cs6204/httpd
 23480 ?        S  0:00 httpd -d /home/abrams/cs6204/httpd
 23481 ?        S  0:00 httpd -d /home/abrams/cs6204/httpd
 23482 ?        S  0:00 httpd -d /home/abrams/cs6204/httpd
 23483 ?        S  0:00 httpd -d /home/abrams/cs6204/httpd
 20036 pts/7    S  0:01 -csh
 23485 pts/7    O  0:00 ps -x

When you want to shut down your server, be sure to kill the httpd processes by typing the command "kill 23480 23481 23482 23483". (You should replace the numbers 23480 and so on by the numbers that appear in the output of the "ps -x" command.) I cannot overemphasize the importance of this -- if you don't do it then actor.cs.vt.edu's resources will get used up by unneeded httpd processes!

Requirements

After installing the server, complete the following actions. Note that the file suffixes I am using are .htm (not .html) and .txt -- use exactly those suffixes.

  1. Create a root document with the name index.htm in the DocumentRoot directory. (See Fig. 1-11 on page 21 in the Stein book, and page 73, for an explanation of "DocumentRoot.")

  2. Configure your server so that any file with suffix ".txt" or ".htm" returns a mime type of "text/html".

  3. Create a directory named public in the DocumentRoot directory. In directory public, create a document called "books.txt." The file should contain the following html file (but feel free to substitute your own titles and authors):
    <html>
      <title>My Favorite Books</title>
      <body>
        <p><B>Hunt for Red October</B> by Tom Clancy
        <p><B<The Color Purple</B> by Alice Walker
      </body>
    </html>
    

    Note that if you accomplish item 2 above correctly, file books.txt will be displayed as an html file when anyone views it with a Web browser, even though it does not have .htm as a suffix.

  4. Create a directory named secret in the DocumentRoot directory. In directory secret, create a document named secret.htm. Put anything you want in it. Restrict its access so that no host in domain .cs.vt.edu can access it.

  5. Create a directory named only-actor in the DocumentRoot directory. In directory only-actor, create a document named only-actor.htm. Restrict its access so that only a Web browser running on actor.cs.vt.edu can view the file.

  6. Create a directory named password in the DocumentRoot directory. In directory password, create a document named password.htm, which can only be accessed if the user enters name "cs6204" and password "vpi".

Submitting Your Assignment

When you have completed the above requirements, send electronic mail to abrams@vt.edu with the subject line

CS6204: Web Server Completed

The body of your message should state the URL of your root document. For example, I run my server at port 1108 (in honor of the first computer I used, a Univac 1108), so my root document is at URL http://actor.cs.vt.edu:1108/. If you try this URL, it will only work if I've started by Web server. (I'll try to leave my server running so you can try this URL, and visit my pages.)

Sometime in class I'll announce a day and time at which I'd like to test your server. At that time you should log into actor and start your web server on the port number in the URL you sent me. (If two people use the same port number, I'll let them know.)


Return to CS6204 home page.

Last modified on 8 November 1996.

Send comments to abrams@vt.edu.
[This is http://ei.cs.vt.edu/~wwwbtb/fall.96/WebServer/index.html.]