Chapter 1. DynaWeb Server Overview

A DynaWeb server makes IRIS InSight books available to World Wide Web clients. DynaWeb dynamically converts the InSight SGML-tagged text and graphics into hypertext markup language (HTML) form.

This chapter explains the components of the DynaWeb server including the programs used to administer it, the directory structure of the DynaWeb Server, and the features of the DynaWeb server that give the individual administrator great flexibility configuring the server. The major sections in this chapter are

How Does DynaWeb Work?

DynaWeb has two major components, a server and an SGML-to-HTML converter.

Like any Web server, a DynaWeb server listens for HTTP requests from clients. Each request contains a URL that identifies the server and a particular block of data such as a home page, a section of text, or an image.

InSight books are binary files that contain SGML-tagged text and graphics. The SGML-to-HTML converter transforms each request for all or part of an InSight book into an HTML-tagged text stream. If a large block of text is requested, the converter dynamically builds a table of contents (TOC) for the text.

These components work together to handle requests from Web clients, as shown in Figure 1-1.

Figure 1-1. DynaWeb Architecture


By default, a DynaWeb server listens for incoming requests on port 88. The server can simultaneously handle up to 256 requests. Whenever a Web client requests data from a DynaWeb server, the browser sends an HTTP request to the server specifying the information to be sent. On receiving the request, the server establishes a connection with the client and passes the data request to the DynaWeb SGML-to-HTML converter. The information is transmitted back to the client.

The connections are short lived, lasting only long enough for the server to process the requested data and send it to the client. After sending the requested information, the server terminates its connection.

Alternatively, rather than running the DynaWeb server, another HTTP server such as the Mindshare Out Box Web Server, the Netscape Commerce Server, or the Netscape Communications Server can serve InSight books. In this case the DynaWeb SGML-to-HTML converter is run by the HTTP server as a CGI script. For more information, see the section “Running DynaWeb as a CGI Script” in Chapter 2.

DynaWeb Directory Structure

Figure 1-2 shows the DynaWeb directories. The DynaWeb directory structure helps to isolate other parts of the filesystem from Web clients. The directory /usr/lib/Insight/dweb/servroot is the highest point in the DynaWeb directory tree that any Web client can access and is called the DynaWeb root directory. The paths of all files accessible to Web clients are defined relative to the DynaWeb root directory. In this way, the root directory helps control the part of the host filesystem that is accessible to Web clients.

Figure 1-2. DynaWeb Directory Structure


The directories included with the DynaWeb product and their contents are

bin  

Executable files.

cgi-bin  

Sample CGI scripts.

data/config  

Configuration files for DynaWeb, including dynaweb.cfg.tmpl.

data/security  

A licensing file.

data/styles  

Conversion stylesheet templates for SGML to HTML.

logs  

Log files produced by DynaWeb.

servroot  

The DynaWeb root directory. All information below this directory is publicly accessible.

servroot/C  

Error message pages, HTTP error codes, and template files.

servroot/docs 

HTML documents including the DynaWeb home page and a help page.

servroot/icons 

Icon files for the control buttons used by DynaWeb.

servroot/icons/alt 


Alternate icons for some DynaWeb buttons.

servroot/images  


The images used by DynaWeb.

Collections of books are added to the DynaWeb directory structure by linking or copying directories to the /usr/lib/Insight/dweb servroot directory. This is discussed in detail in the next section, “Collections.”

Collections

A DynaWeb collection is an InSight bookshelf containing one or more InSight books that a DynaWeb server offers to Web clients. Each collection is a directory in the DynaWeb root directory and each book in a collection is a subdirectory of the collection directory. Collections are added to the DynaWeb root directory in three ways:

InSight book collections are automatically made available to the DynaWeb server by means of symbolic links in the DynaWeb root directory. Using symbolic links in this way simplifies book maintenance and DynaWeb upgrades. Figure 1-3 shows how these directories are linked.

Figure 1-3. Symbolically Linked Collections


In Figure 1-3, the DynaWeb servroot directory contains symbolic links to the SGI_Admin, SGI_Developer, and SGI_EndUser directories. These directories are collections.

Web clients can navigate downwards within a linked directory, so everything within and below /usr/lib/Insight/dweb/servroot is accessible to Web clients. However, browsers cannot move upwards from the linked directory to its parent directory. Instead, when moving backwards from /usr/share/Insight/library/SGI_bookshelves/SGI_Admin, browsers land back in /usr/lib/Insight/dweb/servroot—inside the DynaWeb root directory.


Note: Though symbolic links provide a useful administrative technique, casual use of symbolic links can create security risks. To reduce security risks, linked directories should contain only public information. Also, if a linked directory is, itself, linked to another directory, Web clients can jump to and move downwards within the other directory. Therefore, linked directories should never have any links to other directories.

Because the DynaWeb server collects information about available collections and books only when it starts up, changes to the collections and books that happen while the server is running are not displayed to client users. When collections are added, books are added, or books are removed, the DynaWeb server must be restarted so that it displays the available collections and books. See the section “Running DynaWeb as a Process” in Chapter 2 for instructions.

Executables

When DynaWeb is installed, three programs are installed into the DynaWeb bin directory. These three programs are

dynaweb  

The dynaweb program is the DynaWeb server. Using the dynaweb program is described in the section “Running DynaWeb as a Process” in Chapter 2. For more information about the dynaweb program, see the dynaweb(1M) reference page.

dwsgml2html  

dwsgml2html converts standard generalized markup language (SGML) into the hypertext transfer markup language (HTML) for transmission over the Internet and interpretation by Web browsers. It is used internally by the DynaWeb server and does not need to be activated or executed otherwise. This program can also be used to run DynaWeb as a CGI script piggybacked on another server. See the section “Running DynaWeb as a CGI Script” in this chapter for further information.

dwpasswd  

If the DynaWeb server is using HTTP authentication to limit access to the server, dwpasswd is used to add users and their passwords to a password file that it creates and to verify users. More information on HTTP authentication and the dwpasswd executable can be found in the section “Administering HTTP Authentication” in Chapter 2.

Home Page

A home page is an HTML document that welcomes client users to the DynaWeb root directory on the server, introduces your Web site to them, and provides at least one predefined browsing choice for accessing information offered by the server. DynaWeb supplies a default home page (/usr/lib/Insight/dweb/servroot/docs/homepage.html), which can be replaced with another home page.

When a user accesses the root directory of the DynaWeb server, the server displays whatever home page is identified by the DWEB_HOMEPAGE parameter. Minimally, this home page needs to contain a hypertext link to the value of the DWEB_COLLECTMAGIC parameter, which is /DWEB-COLLECTIONS. This value tells the server to display the collection list. (See the section “Collection Parameters” in Chapter 3 for more information.)

Publisher's Page

A publisher's page is an optional HTML document that publishers can use for any purpose, such as presenting forms to collect data from client users, or providing a list of other sites of interest. For example, a publisher's page might enable readers to submit evaluations of documents or notes about improvements or upgrades. Each such form is linked to a script that handles both the form and the submitted information. A publisher's page must be in the directory /usr/lib/Insight/dweb/servroot/docs.

Access and Error Logs

DynaWeb supports an access log file and an error log file. By default, the server logs information to both files. However, you can turn off either or both kinds of logging by using the DWEB_ACCESSLOG and DWEB_ERRRORLOG configuration parameters. See the section “Message Logging Parameters” in Chapter 3 for more information.

The log files are fully compatible with the HTTPD protocol, which allows you to use any of the available filtering tools for NCSA or CERN servers. You can use scripts to extract useful statistics such as the total number of accesses, the number of requests, and the type of information requested. For more information and some sample filtering tools, see http://www.w3.org/hypertext/WWW/Tools/Overview.html.

CGI Scripts

DynaWeb supports Common Gateway Interface (CGI) scripts. CGI defines an interface that lets your server run scripts. You can use an HTML form as an interface to an external CGI script that replaces parameters with the value a user specifies in the form. Sample CGI scripts can be found in the /usr/lib/Insight/dweb/cgi-bin directory.

For additional information, including a complete description of the Common Gateway Interface, refer to http://hoohoo.ncsa.uiuc.edu/cgi/.

ISMAP Images

DynaWeb supports hot graphics (clickable graphics that link to different destinations depending where on the graphic you select) by supporting the ISMAP attribute on HTML <IMG> tags. DynaWeb conforms to the NCSA standard for handling ISMAPs, except that the map file is referenced by a direct path, instead of through a central file. This is possible because the DynaWeb server handles ISMAP requests by itself, without calling a CGI script.

Instead of specifying a central map register file for the value of the HREF attribute, enter the path to the .map file for that particular image. For example,

<A HREF=/maps/imagename.map><IMG ISMAP SRC=srcpathname></A> 

Maps should be located in the maps directory in the DynaWeb root directory. Below is an example of the contents of a .map file:

# Map to go to home page and search page
default http://frenzy.engr.sgi.com
rect /docs/homepage.html 13,5 186,29
rect http://frenzy.engr.sgi.com:80/lib/librarian.html 194,5 366,29

In this map, rect specifies the type of coordinate. Other possibilities are circle and poly. The second field on these lines is a hypertext link. The third and fourth fields are graphics coordinates whose origin is the lower left corner.