David Ragozin: Web Page Resources

Information and Links for Web Page Development


Here are a few of topics that were relevant to the development of personal and class websites for David Ragozin. Information is provided in hope that other U of W math department faculty and students may benefit from the experience.

Topics:



[Seperator Line]

Password Protection of Web Documents

There are cases when you may want to protect web documents with a password. For example, you might want to make homework solutions available to your own class without having to worry that you will create problems for the instructors of other sections who have different homework schedules. Here are two easy ways of accomplishing this:

  1. Put the documents in a directory under your .www directory on math and password-protect that directory.
    Since all documents on math must be world-readable in order to be served by the server, this does not protect the documents from anyone with an account on math. However, it serves the purpose for howework documents for undergraduate courses since no undergraduates can get an account on math without special permission (and very few have special permission- you may find out who does by consulting the math systems administrator).
  2. Put the documents in a directory in your public_html directory on weber.u.washington.edu, the general university web server, and password-protect that directory. (If you aren't familiar with weber, see Weber and University Computing Resources below.)
    Then change the file modifications for the documents so that they are world-readable but not group-readable. The machines with access to the weber directory tree are set up so that all non-priviledged users belong to the same group, and excluding group-read permissions excludes those users without excluding other users (such as the server). So your documents should be safe from anyone who does not have the password.

How to create a password-protected directory:

Say you want to password protect a directory called PROT.

(1) Inside PROT, create a file called .htaccess with the following contents:

AuthUserFile /user0/m308/.www/PROT/.htpasswd AuthGroupFile /dev/null AuthName David Ragozin AuthType Basic require user ragozin

Then change m308 (after require user) to the name that you want to type in when prompted for your password. Change David Ragozin (after AuthName) to the name you wish to have show up in the password prompt message, which will be something like "Enter username for David Ragozin at www.math.washington.edu". Change /user0/m308/.www/PROT/.htpasswd (after AuthUserFile) to yourpath/PROT/.htpasswd.

(2) Inside PROT, type
/net/WWW/httpd_1.4.2/bin/htpasswd -c .htpasswd user
if you are using the math server, or
/www/adm/bin/htpasswd -c .htpasswd user
if you are using weber, where user is the name you typed in after require user in your .htaccess file. This should create the password for user and store it in an encrypted form in the file .htpasswd.

(3) Do a chmod 705 for .htpasswd and .htaccess, since both must be world readable and world executable for the server to use them.

Now your're Done!

[Seperator Line]

CGI Programs and Server-Side Includes

If you are not sure exactly what a cgi program is, an excellent description can be found at http://hoohoo.ncsa.uiuc.edu/cgi/intro.html. Of course cgi programs can do all sorts of wonderful things from mailing you the output of a class registration form to creating animated images.

Neither the math nor mscc servers currently allow cgi programs to be placed in one's personal .www or public_html directory. However, the public university server weber.u.washington.edu allows any U of W student or faculty member with an account on saul to create his or her own public_html directory from which cgi programs can be run. For information on how to create a weber account, see Weber and University Computing Resources below.

A number of cgi programs which may be useful especially to math department faculty members as well as others are available at David Ragozin's CGI Resources site. These programs were originally developed or modified for David Ragozin's Math 308 class website.

If a server does not allow server-side includes, you do not have easy access to some of the basic features provided by this mechanism; for example, you cannot directly include the last modification date of an html file in your document as text. Many servers (including the weber, math, and mscc servers) do not allow server-side includes because they create a heavy load on the server by forcing it to parse each line of a served html file looking for server-side include directives. However, if you want to have the last modification date feature in your html documents on weber, you can find a special cgi program written for this purpose at David Ragozin's CGI Resources site.

[Seperator Line]

Weber and University Computing Resources

First of all, how do you get an account on weber? Just login to your saul account, go to your home directory, and at the prompt type new-weber. That's it! A public_html directory will be created for you on weber, and it will come with a start-up personal home page and a readme file with some basic information. You cannot actually login to weber directly; your public_html directory on weber is accessed through a symbolic link to this directory from your home directory on saul.

University Computing has created a wonderfully helpful web site called the webdemo account which contains tons of practical and helpful information along with many examples related to creating/managing a web site. It discusses everything from the very basics of how to create an html document to more advanced topics such as how to create an imagemap. It is a most highly recommended resource.

[Seperator Line]



[Last Modification Date Image]



Back to David Ragozin's Home Page
[Left Arrow]