Sie sind auf Seite 1von 3

Posting Your Own CS WWW Page

Je rey D. Oldham
1999 De 21

This do ument des ribes how to make existing WWW pages available
from your Trinity CS a ount; it assumes you have somehow already reated
the WWW pages.

1 Prerequisites
Sin e WWW pages are stored as les, you will need to know about UNIX
les and UNIX le permissions. If not, read those tutorials rst.

2 The WWW Model


Most WWW pages are les ontaining HTML ode. The HTML language is
relatively primitive and uninteresting to learn and will not be dis ussed here.
The address of a Trinity CS WWW page su h as http://www. s.trinity.edu/-
~joldham0/tutorials/WWW-post/index.html onsists of three parts:
the server name: www. s.trinity.edu spe i es the omputer that will
servi e your request,
the user's name: ~joldham0 tells the www. s.trinity.edu omputer to look
in the ~joldham0/Lo al/HTML-Do uments dire tory, and
the le: tutorials/WWW-post/index.html spe i es the lo ation of the WWW
page. The le index.html is lo ated in the tutorials/WWW-post sub-
dire tory of ~joldham0/Lo al/HTML-Do uments.
 1999 Je rey D. Oldham (oldham s.trinity.edu). All rights reserved. This do -
ument may not be redistributed in any form without the express permission of the author.

1
3 Posting a WWW Page
Making a WWW page available to the outside world is as simple as pla ing
a le ontaining HTML in your ~/Lo al/HTML-Do uments dire tory. For
example,
p index.html ~/Lo al/HTML-Do uments

4 File Permissions
(I believe the following to be orre t, and it works for me, but te hni al
details may partially invalidate some of the laims.)
The le's permissions ontrol whether the WWW page is visible. Ensure
everyone has read privileges for the WWW page:
hmod a+r WWW-page- le
The permissions of ea h dire tory starting with your home dire tory
must have both read and exe ute permissions.1 For example, for a WWW
page lo ated at ~joldham0/Lo al/HTML-Do uments/tutorials/WWW-post/-
index.html, my home dire tory, the Lo al dire tory, the HTML-Do uments
dire tory, the tutorials dire tory, and the WWW-post dire tory must have
read and exe ute privileges. To do this, apply
hmod a+rx dire tory
to ea h dire tory starting with your home dire tory.
This requirement that your home dire tory is readable and sear hable
means that any Trinity CS user an look at the les in your home dire tory.
To ensure these les' priva y, make sure their le permissions only permit
you, the owner, to a ess them. Alternatively, move them into a subdire tory
of your home dire tory.

5 An Optimization
Just as a table of ontents lists a book's ontents, most dire tories ontaining
WWW pages need a WWW page named index.html listing the dire tories'
ontents. This is su h a ommon pra ti e that a WWW address su h as
1 Te hni ally,only exe ute permissions are ne essary, but then users must know the
entire exa t name of your WWW pages; they will not be able to \walk through your
WWW hierar hy" to nd other pages. This is sometimes a feature.

2
http://www.foo. om/
is equivalent to
http://www.foo. om/index.html

6 Further Reading
I do not know where to \read more about it." Please send suggestions to
Je rey D. Oldham.

Das könnte Ihnen auch gefallen