Notes for WWW Information Publishers at UO

WWW information providers fall into two broad categories: managers of WWW servers, and individuals providing information for inclusion on existing servers (writers and publishers).

Writing Documents for use on WWW

If you are interested in providing information to be included in an existing WWW server, you will need to have some understanding of the structure of the World Wide Web, URLs (Uniform Resource Locators, i.e. WWW addresses), HTML (the language used in most documents on a web server), and document formats in general. In addition, you will also need to know the local policies and procedures for providing information on your server.

Most web publishing consists of making available files that contain the information you want to publish. There are many possible formats of information you might place in such files; whatever kind of information you publish, you should name your file with a "file type" (sometimes called the file "extension) appropriate to the kind of document it contains. Some commonly seen file formats on the web include:

ordinary ascii text    .txt
HTML hypertext         .html or .htm
GIF format images      .gif (good for icons, line art, etc.)
JPEG format images      .jpeg (good for photos)
sounds                 .au (8 KHz ulaw; other formats also possible)
movies (MPEG)          .mpeg
Adobe Acrobat (PDF)    .pdf
It is also possible to write programs (scripts) that generate files in some other format "on the fly."

An important issue you need to be concerned with is copyright. Except for materials covered under "fair use" provisions of the copyright law, you must be careful to obtain permission for the use of any materials, especially those developed outside UO. Note, though, that creating a link to someone else's materials is just citation, not copying. The flip side of copyright protection is that you (or the UO, if it's a work for hire) probably hold copyright to anything you publish on WWW, but given current norms it is likely that your copyright will be routinely violated -- expect anything you publish to be copied.

Another important issue is accessibility. Particularly if you are writing UO official materials, it is important to make your work as accessible as possible, e.g. to blind "readers" who may use a web browser that speaks the text they are "viewing". The UO Adaptive Technology Lab provides assistance in making technology accessible to UO students with disabilities.

Once you have created your materials, it is a good idea to take a look at them with several different WWW browsers, since different browser software will present your materials differently. In particular, it is generally desirable to review your materials using both some version of Netscape and using Lynx, since the differences in appearance between graphical browsers and text-only browsers are often very significant. What may be less obvious is that things often look different on a 640x480 Mac from how they appear on a 1280x1024 X terminal.

Getting Started

For help on writing HTML and specifying URLs see for example: There are several good HTML style guides. Among the best are: See also the

Many tools exist to ease authoring of HTML documents and conversion of existing documents to HTML format. For example, if you have a Microsoft Word or Wordperfect document, you can convert it to HTML. Specialized editors for HTML are becoming widely available, as are addons to standard word processors that generate HTML. The set of tools is changing very rapidly, so it is hard to make recommendations as to the best current tools. For an extensive list of web-related tools, see the Yahoo Web catalog from yahoo.com

Publishing

Once you've written a WWW document, you still need to publish it. Publishing consists of making the document publicly available, and advertising its address so other people can find it easily.

When publishing materials of general interest to the UO community, it is usually desirable to announce their availability with an email message to webmaster@www.uoregon.edu. Include in the message the URL of the main entry point to your materials, and your best guess as to where links to the materials belong in the UO web.

Some general references on Web publishing are:

Although in principal it is possible to limit access to web pages in various ways, in practice publishing tends to be "all or nothing." You can expect that as soon as you place your authoring efforts on a public web server someone somewhere on the Internet will read them.

Providing information for www.uoregon.edu

One major WWW server at UO is the one on which the UO home page resides. For information about placing information on that server see About this server (www.uoregon.edu).

Most information on that server consists of links to other information on other servers at UO. If you have put together a body of related material that you believe is of general interest to the UO community, we can include a pointer to it. Send email to webmaster@www.uoregon.edu.

Providing information on darkwing and gladstone

People with Computing Center darkwing or gladstone accounts can post information for themselves on the web. For more information, see the Computing Center handout Creating a WWW "Home Page" on Gladstone . Typical steps in posting information might include:
  1. Create a directory in your top level darkwing or gladstone directory called "public_html".
  2. Create your web page in public_html.
  3. Make sure your directory and the files in it are world-readable, and that your home directory, the public_html directory, and any subdirectories, also have "execute" i.e. Unix search, access.
  4. To reference your work, tell people to look at the URL http://darkwing.uoregon.edu/~myusername/index.html
    where myusername is replaced by your darkwing user name, and index.html is replaced with whatever file name you created. If you were publishing on gladstone, the "darkwing.uoregon.edu" would be replaced by "gladstone.uoregon.edu."
If it's your only web page, or if it's an index for other pages in your directory, call it index.html. If it's your personal home page, you might call it home.html. If it's the main page for a course, you might call it by the name of the course, e.g. cs123.html. If it's the main page for a campus organization, perhaps it should be named for the organization, e.g. asuo.html, or perhaps the organization needs its own account. You can refer to files in subdirectories of your public_html directory by specifying a path in Unix-like syntax. For example, a file ~/public_html/images/photo.gif could be found at http://darkwing.uoregon.edu/~myusername/images/photo.gif.

You can create HTML web documents (names ending in .html), GIF images (.gif), plain text (.txt), MPEG movies (.mpeg), scripts that generate documents (.cgi), etc. You can also create subdirectories of your main public_html directory.

Once you've created a web page on darkwing or gladstone, you can request that the Computing Center include your index page (index.html) in the list of web authors by sending email to webmaster@www.uoregon.edu.

Providing information on the VMScluster

People with Computing Center oregon, donald, or daisy accounts can also post information for themselves on the web. The support on the VMScluster is currently experimental. See the Computing Center document Creating a WWW "Home Page" on Oregon for further details.
  1. Create a subdirectory in your top level directory called "WWW". For example, you could use the command
    CREATE/DIRECTORY [.WWW]/PROTECTION=W:RE
  2. Create your web page in your [.WWW] directory, e.g. index.html.
  3. Make sure your directory and the files in it are world-readable. For example,
    SET FILE [.WWW]*.*/PROT=W:R
    Note that every time you create a new file in your WWW subdirectory you must change its protection, since the default protection on the VMScluster is no public access.
  4. To reference this, tell people to look at the URL http://www-vms.uoregon.edu/~myusername/index.html where "myusername" is replaced by your VMScluster user name, and index.html is replaced with whatever file name you created.
You can create HTML web documents (names ending in .html), GIF images (.gif), plain text (.txt), MPEG movies (.mpeg), etc. When placing non-text documents in your oregon directory, make sure to transfer them in binary mode. Due to security and performance concerns, it is not possible to create interactive forms or dynamic documents (documents where the material is computed at the time the document is read) on this server.

You can refer to files in subdirectories of your WWW directory by specifying a path in Unix-like syntax. For example, a file [MYUSERNAME.WWW.IMAGES]PHOTO.GIF could be found at http://www-vms.uoregon.edu/~myusername/images/photo.gif. Although file and directory names on the VMScluster are case insensitive, it is recommended that you use only lower case in VMScluster URLs.

Once you've created a web page on oregon, you can request that the Computing Center include your index page (index.html) in the list of web authors by sending email to webmaster@www.uoregon.edu.

Providing information on a departmental web server

Several lists of web servers at UO exist, among them UO WWW Servers by Joe St. Sauver. In consulting that list, you may find a local server on which it is appropriate to publish your materials. To publish information on your departmental web server, contact the server administrator for instructions.

Managing a WWW Server

Many organizations and some individuals at UO are currently running WWW servers. Most run either NCSA httpd on Unix, MacHTTP or WebStar on MacOS, or WinHTTPD on Windows. If you are interested in running your own WWW/http server, you should start by reading the documentation for the appropriate server software. Useful resources for server admins include: If you are running a web server that is likely to be moderately permanent, you can add it to the list of UO web servers by sending email to webmaster@www.uoregon.edu.

Some Frequently Asked Questions

Question: What's wrong with my HTML file?

Try checking it using WEBLINT, http://www.unipress.com/weblint/. WEBLINT is a form for picking the "lint" off your HTML documents. It checks your document or HTML code for conformance to the HTML official specifications, and good HTML style. Once you've published your page, just fill out the WEBLINT form and tell it the URL of your page.

Question: My images don't load. What's wrong?

Several plausible reasons. The most common are:

Question: why can't I access the files I've published on OREGON?

Did you create your [.WWW] subdirectory with the appropriate file protection? Did you change the protection of the files in the directory to allow public access?

Question: How do I include a vistor count (odometer) on my page?

I'm not convinced that counters are a good idea, but if you really want one, see "Including a page hit count in a web page."

Question: How do I use imagemaps?

Read the general tutorials on imagemaps, e.g. the Web66 cookbook. You might also find the NCSA HTTPd NCSA Imagemap Tutorial useful. Then see Joe St Sauver's discussion of publishing image maps on gladstone or darkwing.

Question: can I avoid learning HTML by buying a web editor like PageMill?

Probably not. The current generation of web support tools (as of February 1996) isn't quite sophisticated enough. Almost everyone who wants to produce HTML documents will find that he or she needs to examine the "raw" HTML and tune it to the particular needs of the project. Maybe next year.

Question: I'm trying to write a CGI script, but when I test it I get
500 Server error

The error response:
500 Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.
is the generic error message that the server will generate if it gets a bad response on running your cgi script, most commonly because your script wasn't writing correct HTTP headers.

A common cause of this problem is that the script, when run, generates a compiler error rather than the output you (and the server) expected.

For example, suppose I have a perl script that used to work fine (using perl 4.1). The current version of perl is more picky, and finds errors in my script. Perhaps the script has a line in it like:

$user = "jqj@darkwing.uoregon.edu";
If I debug this script by running it directly from the "%" prompt I'll see a meaningful (to me, but not to the web server) error message:
darkwing% ./test.cgi
Literal @darkwing now requires backslash at ./test.cgi line 8,
within string
Execution of ./test.cgi aborted due to compilation errors.
In this case, the fix is to put a "\" in front of each "@" in strings, so the line becomes:
$user = "jqj\@darkwing.uoregon.edu";

Question: How do I create and maintain a log file using cgi scripts without making that file wide open to the world?

CGI scripts on darkwing and gladstone normally run as "nobody", so any files they read and write must have world read/write access. If that's not acceptable, consider three options:
  1. instead of writing to log files, have your CGI script generate email. If you then want to be sophisticated in processing the email, consider using procmail at the receiving end (which runs as you, not as an anonymous user).
  2. instead of using darkwing, use a departmental or personal web server where you have more control over the execution environment and where security is less likely to be a major issue since your customers won't have accounts.
  3. make your CGI script setuid to yourself using chmod. For example:
    #!/bin/sh
    # this is ~jqj/public_html/foo.cgi, and is  chmod 6755 foo.cgi
    echo "Content-type: text/plain"; echo; id 
    When run from the net, this produces:
    uid=60001(nobody) gid=60001(nobody) euid=9301(jqj) egid=160(lib) 
    Setuid programs are potentially dangerous.to your personal file security if you make a coding error. Perl is a good choice of language for setuid programs, since it includes lots of code designed to detect common coding/security errors. Despite the example above, you should never use setuid shell scripts, since they are very insecure.

* UO home page
http://darkwing.uoregon.edu/~jqj/publishing/notes-for-providers.html
JQ Johnson, jqj@darkwing.uoregon.edu, last update 29 May 96