This document is for the ordinary user, not the system "webmaster". It is intended as a short description of how to use the WN server to set up your home page (and related documents if you wish). It is not a primer on writing HTML. There are many of those -- some are listed below. Instead it deals with what to do with a home page document after it is created to put it "on the Web". We assume that your system administrator has already set up the WN server in such a way that users are permitted to have home pages in their own directories. If that isn't the case you will have to persuade your local administrator to do so or read the full "User's Guide for the WN Server" to learn how to do it yourself.
But let's be optimistic and suppose everything is set up and working properly. If you haven't created a home page here is a bare bones one you can copy to expand on later:
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<head>
<title>John Doe's Home Page</title>
</head>
<body>
<h1>John Doe's Home Page</h1>
<p>
This is the story of my life...
</p>
</body>
Your home page and any other files you want to serve must be located in
a particular subdirectory of your home directory (your home directory is
where you are when you first login) on the UNIX system which is running
the WN server. Usually this subdirectory is called
public_html
, but your system webmaster may have chosen
something different. We'll assume the name is public_html
.
It probably doesn't yet exist in your home directory. If not create it with the command:
mkdir public_html<Enter>
The public_html
directory also must have the correct
"permissions" so that the server can look inside it. For security
reasons the WN server isn't very powerful and it can only
access files and directories which are not heavily protected. Just to
make sure the server won't have trouble accessing your home page run the
command:
chmod 755 public_html<Enter>
You must place a copy of your home page in this directory and give it
the name index.html
. One way to do this is enter the
public_html
directory and use an editor to create the home
page file there with the name index.html
. Alternatively,
you could create it elsewhere and copy it to the
public_html
directory. If you need to rename it the proper
UNIX command is:
mv oldname newname<Enter>
Of course the server must also be able to read your home page in order to serve it. If documents you create are automatically protected from viewing by others you will have to change that for your home page. The command:
chmod 644 index.html<Enter>
gives anyone (including the server) permission to read but not change your home page.
There is one more step before your home page is available to the world.
The WN server is very security conscious. It is much more
careful about refusing to serve documents which users did not intend to
be served. This means that in addition to serving only documents in
designated directories (such as your "public_html
") it will
only serve documents which have been explicitly designated for serving
in some way.
Here are two different ways to grant the server permission to serve your home page. You only need to do one of these.
Create a file in the public_html
directory named
index
which contains the line:
Attribute=serveall
Then execute the command:
wndex<Enter>
which will create the file "index.cache
". It grants the
server permission to serve anything in this directory. If you put
documents to be served in subdirectories of public_html
,
copy the file index
to them also and rerun
wndex
in these subdirectories to grant permission to serve
anything from them (actually the file "index
" itself is
excluded from being served as are files beginning with the
'.
' character).
Create a file in the public_html
directory named
index
which contains the line:
File=index.html
If you have other files you want to serve add additional lines like
"File=foo.html
" where foo.html
is the name of
the file you want to serve. Then execute the command:
wndex<Enter>
Files which are HTML files should have names which end with the suffix
".html
". Files which are ASCII text files should end with
".txt
" and GIF image files should end with
".gif
". Executing the "wndex
" (pronounced
"windex") command will create the file "index.cache
" as
before, but now the server will only have permission to serve those
files whose names are listed explicitly in your index
file.
If you put documents to be served in subdirectories of
public_html
, you must create an index
file in
each of them also which lists the files which can be served.
The "better way", in addition to providing better security, also enables
many of the advanced features of the WN server, such as
searching capabilities. In the long run if you serve multiple documents
you will probably want to use it. The trade off is that the "lazy" way
is easier since it only needs to be done once, while the "better" way
requires that you edit the index
file and rerun
wndex
each time you add a new file to
public_html
to be served.
So once your home page is functional, how do you access it? Well, your
home page address (called a URL which stands for "Uniform Resource
Locator") is made up from the name of your host and your user name. For
example, if your user name is jdoe
and the computer on
which the server is running is named www.school.edu
then
the URL for your home page is probably:
http://www.school.edu/~jdoe/
The "probably" refers to the fact that there are many possible variations
which may have been chosen by your webmaster. For example, some people
don't like the '~
' character in URL's so they might use
"http://www.school.edu/homepages/jdoe/
". In any case there
are a couple of things to notice about your URL.
First it has a synonym:
http://www.school.edu/~jdoe/index.html
This is because whenever a URL ends in '/
' the server knows
it is referring to a directory (in this case your
public_html
directory) and looks for the default file
"index.html
" in that directory. Thus if you want to put
some files in subdirectories of public_html
that is fine.
But keep in mind that if you create the directory "mydir
" in
public_html
then
"http://www.school.edu/~jdoe/mydir/
" will really refer to
"http://www.school.edu/~jdoe/mydir/index.html
" and to refer
to a file "foo.gif
" in mydir
you should use
"http://www.school.edu/~jdoe/mydir/foo.gif
". You should not
use the URL "http://www.school.edu/~jdoe/mydir
" referring to
a directory but with no '/
' at the end.
There are many advanced features you can use with the WN server. To learn to use them you will need to read parts of the manual designed for system administrators. A good place to start is the chapter "An Overview of the WN Server" in this guide. It will give you a good idea of some of the things the server can do. Then you will likely also want to consult the chapter "Creating Your WN Data Directory" in this guide. Neither of these chapters is too long.
To find out more about composing HTML documents consult "A Beginner's Guide to HTML" (at http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html) or see "Creating Web Sites" (at http://home.netscape.com/browsers/createsites/index.html). "http://www.htmlhelp.com" is an excellent site on the various web authoring standards.