Making Your Files Available on the World Wide Web from the OCF
This document describes how OCF users can make files available via the
OCF's http server and what
restrictions are placed on this service.
Making a directory for the HTTP Server
To create a directory for your homepage in /services/http/users/,
simply run the command: makehttp at the machine prompt and it will
create the appropriate directory for you. Here's an example:
apocalypse [2] makehttp
Creating dirs for johndoe
Creating /services/http/users/j/johndoe: Done.
Adding you to the add log.
Files placed in this directory will then be available using a WWW
client. For example, if the user with the account name foobar
followed the above directions and put a file called stuff.html in
her /services/http/users/f/foobar/ directory, anyone on the Internet
with a WWW client could read it by going to the URL
http://www.ocf.Berkeley.EDU/~foobar/stuff.html
If you put a file named index.html in your directory it
will be shown when no file is specifed (continuning the above example this
is the URL http://www.ocf.Berkeley.EDU/~foobar/ ). If you don't have
such a file, a list of all the files in your directory will be shown instead.
File Types
The WWW server determines what type of file something is by checking the end
of it's name. The full list of recognized types is too long to list here,
but some of the more common ones are:
Suffix File Type
====== =========
.html Hypertext
.shtml Server-parsed Hypertext
.txt Plain Text
.ps PostScript
.bin Binary file
.gif GIF image
.jpg JPEG image
.tiff TIFF image
CGI Scripts
Scripts provided by the OCF
Finger
You can put in a link to finger your OCF account using this format:
http://www.ocf.Berkeley.EDU/cgi-bin/finger-ocf-account?accountname
Counter
You've probably seen the counters on other people's home pages, which say
something like, "You are visitor #00241!". We also have a counter
installed that will allow you to do that. It's called WWW Count 2.2, and
it also allows you to display the current time and date on your home page.
The counter has a wealth of options and parameters that control
its look. If you would like to learn more about them, please consult
the WWW Count Home Page
for further info. If you are satisfied with the default counter look (green
digits on a black blackground with a bluish frame; see the first counter on
the
WWW Count Home Page),
use the following line to display the number of times your page was
accessed:
<img src="/cgi-bin/Count.cgi?df=CHANGE_ME.dat" align="absmiddle">
You will have to replace CHANGE_ME with your OCF username, otherwise
the counter will display a random number. The counter datafile that
contains the number of hits displayed on your page will be created
for you automatically.
Be aware of the fact that the counter displays the number of times
your page has been visited, not the number of unique visitors. If you
want to inflate your ego, you may reload your page N times, thus
incrementing the counter by N.
Running your own CGI scripts
OCF users may install their own cgi scripts either by putting them in a
directory called cgi-bin in your web directory (i.e.
/services/httpd/users/j/joe) or having the script name end in
``.cgi''). By modifying the name you call the script, you can
also see very verbose debugging output to help you fix problems in your cgi's.
- Script: /services/httpd/users/j/joe/cgi-bin/my-script
- URL for regular output:
- http://www.ocf.berkeley.edu/~joe/cgi-bin/my-script
- URL for debugging output:
- http://www.ocf.berkeley.edu/~joe/cgi-debug/my-script
- Script: /services/httpd/users/j/joe/my.cgi
- URL for regular output:
- http://www.ocf.berkeley.edu/~joe/my.cgi
- URL for debugging output:
- http://www.ocf.berkeley.edu/~joe/my.cgi-debug
RealAudio and RealVideo
The OCF also runs a RealMedia server that uses the same directories as the
web server. To serve a real media file, you provide a link to a
Real Server metafile which in turn links to the Real Audio or Video file.
An example of a Real Server metafile (*.ram) on the ocf system for a user
John Doe, with account name jdoe and a file called
welcome.rm in their web directory
(/services/httpd/users/j/jdoe) looks like this:
pnm://realserver.ocf.berkeley.edu/users/j/jdoe/welcome.rm
The full documentation for RealAudio/RealVideo can be found here.
Restrictions
The OCF places very few restrictions on the contents of your WWW area.
We do reserve the right to have any materials removed from your area
that cause problems with the OCF machines or that pose a security
risk. OCF Staff reserves the right to decide exactly what "causes
problems" as unexpected cases arise, but things that definitely cause
problems are anything that might cause legal problems (copyright
violations, etc.), is so popular that it overwhelms our server (either
through volume of traffic or cgi resource usage), or violates OCF
or University policy (for example, putting up a Web page on the OCF
for a business).
There is also a size limit on your WWW area since it does
count towards your disk quota. (If you have a really good reason for
needing more space, you can ask quotas@ocf for a disk quota waiver or ask
www@ocf to put the files in the central OCF server area where they don't
count towards quota.)
Helping others find your documents
If you want your page to be listed in the
list of OCF user pages
send mail to www@ocf and we'll add you in.
If you have any questions about setting up your WWW area, or any other
questions, comments, or suggestions about the OCF's WWW/http services, send
mail to www@ocf.berkeley.edu.
About the OCF's Server
The OCF is currently running version 1.3.0 of the Apache Web Server.
More information about various features of this server is available from
these sites:
Further references
- Basic HTML:
- More Advanced HTML & Web Site Design: