The web server runs as a special user, wwwuser
, which has
minimal privileges. Because of this, any files or directories in the
server's document root must have their permissions
set in a particular way.
Directories must have at least world execute permission set (i.e.
chmod o+x
). This is so the web server can access any files in
that directory.
The directory does not need to have any read permissions set, as
the server does not need to list the contents of the directory - only access
a specifically named file within it.
Files must have at least world read permission set
(i.e. chmod o+r
). This is so the web server can read the contents
of any given file.
CSWeb provides dual document views: basically, one set of pages for people external to UKC, and one set for people internal. So, for example, there may be two versions of Fred Bloggs' "business card" page; one internal, the other external. The internal page might contain Fred's telephone extension number, while the external page might contain Fred's direct dial telephone number.
When a person first visits http://www.cs.ukc.ac.uk/
, they
are directed to the relevant view. Anyone coming from a machine
matching the domain *.ukc.ac.uk
is sent to
http://www.cs.ukc.ac.uk/welcome.local
(the welcome page for the
internal view). If the machine is from any other domain, it is sent to
http://www.cs.ukc.ac.uk/welcome.html
(the welcome page for the
external view).
Filenames ending in .local
cannot be seen outside of UKC.
Filenames ending in .html
can be seen both outside and inside UKC.
Once directed to the correct welcome page, all further links point to
pages in the same view. That is to say all links from welcome.html
point to filenames ending in .html
. That way the user always stays
in the same view.
Internal users can see the external version of a page (if there is one) by
changing the file extension part of the page URL from .local
to .html
. [Some local pages already contain hyperlinks to their
external counterparts where this is deemed to be useful.] Note that external
users can not do the reverse operation and change .html
URLs
to .local
ones, for the reasons detailed above.
This is all achieved using the following template language control structures:
#local..#endlocal
,
#external..#endexternal
and
@local_path
.
The logical layout of the site (i.e. from the document root) is as follows:
/people/
staff/
rpg/
tpg/
ug/
student_resources/
/research/
cur
.
compedu/
infosys/
netdist/
numcomp/
par/
step/
tcs/
/pubs/
/tours/
tour_frameworks/
/dept_info/
documentation/
/national/
There are other directories in the document root that you shouldn't need to worry about:
/search/
/buttons/
#buttons
mechanism.
/icons/
/images/
/styles/
house.css
, but with the provision for supporting more in the future.
This section describes the physical layout of the site - information that will help you in creating your own web pages for the CSWeb site.
Note that only directories relevant to the page creation process are described.
The web server's file root is at /web/cs
on medusa (and
on myrtle, where it is NFS mounted), which is where the following
directories may be found.
bin/
httpd/
docs/
For example, if you wish to change the TCS research group's
"Projects" pages, you'll find them at projects.html
and projects.local
in the directory named
/web/cs/httpd/docs/research/tcs/
.
The changes can subsequently be found on the web at
http://www.cs.ukc.ac.uk:1997/research/tcs/projects.html
and
http://www.cs.ukc.ac.uk:1997/research/tcs/projects.local
.
includes/
#include
control).
man/
templates/
tools/
bin
man
This section describes how to create pages in the house style in general terms, with more detail being available on the manual page for bap.
To create a web page in the house style, follow these steps:
.template
file extension by
taking a copy of the skeleton template file
/web/cs/docs/skeleton.template
.
This contains appropriate Template Definition Language constructs, to generate a web page in the house style.
foo.template
, and
the following command was used:
bap -b foo.template
Two files would be created: foo.local
and foo.html
.
-rw-r--r-- 1 atp 2417 May 19 16:03 foo.html -rw-r--r-- 1 atp 2423 May 19 16:03 foo.localand
drwx--x--x 2 atp 512 May 19 16:03 ./or
drwxr-xr-x 2 atp 512 May 19 16:03 ./for the directory containing the files.
The document root of a web server is the root directory of the server's web
space (rather than its file space). For the CSWeb server, the document root
(http://www.cs.ukc.ac.uk/
) maps to
/web/cs/httpd/docs/ of the machine's file space.
The name given to the home page belonging to either:
~/webpages/index.*
), or
/web/cs/httpd/docs/research/<group_name>/index.*
, where <group_name>
is the abbreviated name (or directory name) of a research group. E.g. infosys = "Information Systems Group").