Chapter 4 Configuring Web Servers and Web sites


Configuring an NSAPI server

This section provides a detailed explanation for setting up an NSAPI server to run with PowerDynamo.

Steps 1 and 2 are part of the PowerDynamo installation procedure. These steps are not necessary if you configured the Web server during installation. You must still complete steps 3 through 5.

For more information, see "Configuring Web servers during installation".

Step 1: Edit the system path in the System Properties window

In Step two of Configuring an NSAPI Server, you will be copying DLLs to the Netscape\server\plugins\dynamo directory of the NSAPI Web server (you will have to create the dynamo directory). For the server to find these DLLs, you must edit your computer's system path to include the directory containing the DLLs.

Note   The DLL directory must be added to the system path, not the user path. NSAPI servers are run as Windows NT services from an NT operating system.

Figure 4-4: System Properties window

Step 2: Install the Application Server

If you haven't done so already, install PowerDynamo onto the Web server machine using the standard software installation. This provides you with tools such as Sybase Central and the Dynamo Configuration folder that are necessary in later stages of the configuration.

Installing the required software

The PowerDynamo Application Server for NSAPI Web servers includes the following files, which are loaded during installation:

The following Powersoft Power++ runtime libraries are installed into your Windows SYSTEM directory or your Windows NT system32 directory:

Configuring an NSAPI server

Netscape Web servers use the NSAPI interface to communicate with the Dynamo Application Server.

For full details on configuring Netscape servers, see your Web server documentation.

Steps To configure Netscape Web servers for use with Dynamo:

  1. Make the appropriate changes to the Netscape Web server configuration file obj.conf. This is a plain text file located in the CONFIG directory of each server configuration.

    Instruct the server to load the dy2ns03.dll or the dy3ns03.dll Application Server. The following is an example line in the obj.conf file. The first line must be typed on a single line, it is wrapped here for display reasons only. The last line Init fn=_dynamo_init should be written on a new line.

    Init fn=load-modules shlib=path/dy2ns03.dll funcs="_dynamo_ntrans,_dynamo_fn,_dynamo_pathcheck,
    _dynamo_init"

    Init fn=_dynamo_init




  2. At the top of the NameTrans list, enter:

    NameTrans fn=_dynamo_ntrans


  3. At the top of the PathCheck list, enter:

    PathCheck fn=_dynamo_pathcheck


  4. Add the following section to the end of the file:

    <Object name=PowerDynamo>
    Service fn=_dynamo_fn
    </Object>



The following is a sample configuration file. Some long lines are wrapped for display reasons. Each separate line in the file is separated by a blank line in this listing.

# Use only forward slashes in pathnames

# backslashes can cause

# problems.

Init fn=flex-init access="c:/Netscape/Server/
https-steverd/logs/access" format.access=
"%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] \"%Req->reqpb.clf-request%\" %Req->
srvhdrs.clf-status% %Req->srvhdrs.content-length%"

Init fn=load-types mime-types=mime.types

Init fn=load-modules shlib=c:/Netscape/Server/Plugins/dynamo/dy2ns03.dll funcs="_dynamo_ntrans,_dynamo_fn,_dynamo_pathcheck,
_dynamo_init"

Init fn=_dynamo_init

<Object name=default>

NameTrans fn=_dynamo_ntrans

NameTrans fn=pfx2dir from=/ns-icons dir="c:/Netscape/Server/ns-icons"

NameTrans fn=pfx2dir from=/mc-icons dir="c:/Netscape/Server/ns-icons"

NameTrans fn=document-root root="c:/Netscape/Server/docs"

PathCheck fn=_dynamo_pathcheck

PathCheck fn=nt-uri-clean

PathCheck fn=find-pathinfo

PathCheck fn=find-index index-names="index.html,home.html"

ObjectType fn=type-by-extension

ObjectType fn=force-type type=text/plain

Service method=(GET|HEAD) type=
magnus-internal/imagemap fn=imagemap

Service method=(GET|HEAD) type=
magnus-internal/directory fn=index-common

Service method=(GET|HEAD) type=*~magnus-internal/* fn=send-file

AddLog fn=flex-log name="access"

</Object>

<Object name=cgi>

ObjectType fn=force-type type=magnus-internal/cgi

Service fn=send-cgi

</Object>

<Object name=PowerDynamo>

Service fn=_dynamo_fn

</Object>

A document named test.stm in the Dynamo Web site folder would then have the following URL:

http://server-name/Site/test.stm

The URL contains the server name, followed by the URL prefix defined in the Application Server mapping: in this case /Site. This mode of addressing is exactly the same as for the Personal Web Server.

Step 3: Create an ODBC System Data Source Name (DSN)

Creating a System DSN is the same as creating a DSN except a System DSN is available to all users on a machine as well as services.

Note   Note If you are connecting to a file-based Web site, or using an Open Client connection, this step is not necessary. If you are using Windows 95, create a data source; you do not need a system DSN.

Steps To create an ODBC System Data Source Name:

  1. Start the ODBC Administrator from the Utilities folder in Sybase Central.

  2. Select the System DSN tab. Click Add.

  3. From the Create New Data Source window, select the appropriate ODBC driver; for example, Adaptive Server Anywhere 6.0. Click Finish.

  4. Enter the:



    Click OK.


Note  

Creating an ODBC data source to connect to an Adaptive Server Enterprise database
When you are creating an ODBC data source for an Adaptive Server Enterprise database the Select Method must be set to 0 - Cursor for Dynamo to work. The Select method setting is located within the ODBC Administrator -> ODBC Sybase Driver Setup -> Performance Tab

Steps To ensure that the ODBC data source is available:

  1. If you are using Adaptive Server Enterprise as the data server, ensure the appropriate client library software and ODBC driver have been installed.

  2. If you are using Adaptive Server Anywhere as the data server, copy the Web site database file and transaction log file into an appropriate directory on the Web server machine and ensure that the database engine together with the Adaptive Server Anywhere ODBC driver and its attendant libraries are accessible on the machine.

  3. If you are using the Adaptive Server Anywhere network server as the data server, install the Adaptive Server Anywhere client together with the Adaptive Server Anywhere ODBC driver and its attendant libraries on the Web server machine.


Step 4: Create a connection profile

You should create a connection profile for your Web site to store connection information in the registry in encrypted form. This information is used by Sybase Central, the Personal Web Server, and the Dynamo Application Servers.

Note  

Note
If you are connecting to a file-based Web site, or using an Open Client connection, see "Creating a connection profile for your Web site".

Steps To create an ODBC connection profile for your Web site:

  1. From Sybase Central, select Tools ->Connection Profiles.

  2. Click New.

  3. Enter a name for the connection profile, and select PowerDynamo from the list of available types. Click OK.

  4. Select an ODBC data source from the drop-down list. If appropriate, enter a user ID and password, and any additional parameters and descriptions. Click OK to create the connection profile.


Step 5: Configure the Application Server

Once the site Web server receives an URL from a Web client, it passes it to the Dynamo Application Server, which locates and processes the document. You must add a mapping to the Application Server so it can locate the document. Use the Configuration folder found within the Utilities folder of Sybase Central to add a mapping to the Application Server.

Dynamo configuration

Steps To add a new mapping using the Dynamo Configuration folder:

  1. In the left pane of Sybase Central, open the Utilities folder.

  2. In the right pane of Sybase Central, open the Configuration folder.

  3. Double-click the Mappings folder.

  4. Double-click Add Mapping.

  5. Enter a URL prefix, the Dynamo site type, the resource to access on your machine and the maximum size of the document cache.

  6. Restart the server for these changes to take effect.


For a more detailed description of how to configure the Dynamo sites using Sybase Central and the Configuration folder, see "Configuring Web sites".

 


Copyright © 1999 Sybase, Inc. All rights reserved.