Internal Users

Related Links

University Links

Notes on the CSWeb architecture

The web server

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.

Directory permissions

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.

File permissions

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.

Dual document views

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.

Technical note

This is all achieved using the following template language control structures: #local..#endlocal, #external..#endexternal and @local_path.

Logical site layout

The logical layout of the site (i.e. from the document root) is as follows:

/people/
People pages and any automatically generated indexes to those pages.

staff/
Staff web pages, including their "business card" pages.
rpg/
Research postgraduate web pages, including their "business card" pages.
tpg/
Taught Postgraduate "business card" pages.
ug/
Undergraduate "business card" pages.
student_resources/
E.g. useful contacts, etc.

/research/
Research group web pages (including their "business card" pages) and any automatically generated indexes to those pages. Note that all research group directories (listed below) are writeable by members of cur.

compedu/
Computers and Education Research Group.
infosys/
Information Systems Group.
netdist/
Networks and Distributed Systems Group.
numcomp/
Numerical and Scientific Group.
par/
Parallel Computing Group.
step/
Software Tools and Electronic Publishing Group.
tcs/
Theoretical Computer Science Group.

/pubs/
Contains one directory for each year which, in turn, contains a directory for each publication published in that year. Each "publication directory" contains the web pages for an individual publication, together with its abstract and full text, if these are available.
Also contains any automatically generated indexes to those pages.

/tours/
Guided tours

tour_frameworks/
Frameworks files listing the pages in each tour.

/dept_info/
Departmental information: documentation, etc.

documentation/
CSWeb site documentation.

/national/
National and international services and facilities based at UKC.



There are other directories in the document root that you shouldn't need to worry about:

/search/
Front pages for search engines.
/buttons/
House buttons, as used by the #buttons mechanism.
/icons/
Default (Apache) web server icons.
/images/
Common images, such as the UKC crest.
/styles/
Contains cascading style sheets. Currently there is only one, house.css, but with the provision for supporting more in the future.

Physical site layout

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/
Home of the following command line user tools: bap, bipi, bp, Rbrgp, brgpi, btp, chin, chrg.

httpd/
The web server directory. Contains all file and directories used by the server.

docs/
The web server document root. All files that can be served on the web are in here.

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/
Common include files (for use with the #include control).

man/
Brief manual pages for the command line user tools.

templates/
Templates for every page on the CSWeb server.

tools/
Useful web building tools.

bin
Executable code for the tools.

man
Manual pages for the tools.

Templates and the house style

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:

  1. Create a file with a .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.

  2. Run the template through bap. Say the template was called foo.template, and the following command was used:

    bap -b foo.template

    Two files would be created: foo.local and foo.html.

  3. Make sure the permissions are set correctly, as described above. I.e.:

    -rw-r--r--   1 atp          2417 May 19 16:03 foo.html
    -rw-r--r--   1 atp          2423 May 19 16:03 foo.local
    	
    and
    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.

Glossary of terms

Document root

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.

"Business card" page

The name given to the home page belonging to either:


 UKC Department Search Research Courses Publications