Posting Your Own CS WWW Page1

Jeffrey D. Oldham

1999 Dec 21

This document describes how to make existing WWW pages available from your Trinity CS account; it assumes you have somehow already created the WWW pages.

Prerequisites

Since WWW pages are stored as files, you will need to know about UNIX files and UNIX file permissions. If not, read those tutorials first.

The WWW Model

Most WWW pages are files containing HTML code. The HTML language is relatively primitive and uninteresting to learn and will not be discussed here.

The address of a Trinity CS WWW page such as http://www.cs.trinity.edu/~joldham0/tutorials/WWW-post/index.html consists of three parts:

the server name:
www.cs.trinity.edu specifies the computer that will service your request,
the user's name:
~joldham0 tells the www.cs.trinity.edu computer to look in the ~joldham0/Local/HTML-Documents directory, and
the file:
tutorials/WWW-post/index.html specifies the location of the WWW page. The file index.html is located in the tutorials/WWW-post subdirectory of ~joldham0/Local/HTML-Documents.

Posting a WWW Page

Making a WWW page available to the outside world is as simple as placing a file containing HTML in your ~/Local/HTML-Documents directory. For example,

cp index.html ~/Local/HTML-Documents

File Permissions

(I believe the following to be correct, and it works for me, but technical details may partially invalidate some of the claims.)

The file's permissions control whether the WWW page is visible. Ensure everyone has read privileges for the WWW page:

chmod a+r WWW-page-file

The permissions of each directory starting with your home directory must have both read and execute permissions.2 For example, for a WWW page located at ~joldham0/Local/HTML-Documents/tutorials/WWW-post/index.html, my home directory, the Local directory, the HTML-Documents directory, the tutorials directory, and the WWW-post directory must have read and execute privileges. To do this, apply

chmod a+rx directory
to each directory starting with your home directory.

This requirement that your home directory is readable and searchable means that any Trinity CS user can look at the files in your home directory. To ensure these files' privacy, make sure their file permissions only permit you, the owner, to access them. Alternatively, move them into a subdirectory of your home directory.

An Optimization

Just as a table of contents lists a book's contents, most directories containing WWW pages need a WWW page named index.html listing the directories' contents. This is such a common practice that a WWW address such as

http://www.foo.com/
is equivalent to

http://www.foo.com/index.html

Further Reading

I do not know where to ``read more about it.'' Please send suggestions to Jeffrey D. Oldham.



Footnotes

... Page1
©1999 Jeffrey D. Oldham . All rights reserved. This document may not be redistributed in any form without the express permission of the author.
... permissions.2
Technically, only execute permissions are necessary, but then users must know the entire exact name of your WWW pages; they will not be able to ``walk through your WWW hierarchy'' to find other pages. This is sometimes a feature.



1999-12-21