Chapter 4 Configuring Web Servers and Web sites


Configuring Web sites

Regardless of the server you are using to access your Web site there are some aspects of Web site behavior that you can configure.

Note  

Configuration is machine specific
Any settings you make in the Dynamo Configuration folder apply to all Web sites accessed from the current machine, whether they are accessed by a Personal Web Server or by a Dynamo Application Server attached to a third party Web server. The configuration information is stored in the Windows 95 or Windows NT registry.

Accessing the Dynamo Configuration folder

You can access the Configuration folder from Sybase Central.

  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. Select the folder you want to work with.

There are three types of information you can configure:

Setting Dynamo mappings

This section describes the elements that make up a Dynamo mapping, and how to set the mappings using the Dynamo Configuration folder.

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 an URL prefix, a Dynamo site type, the site you want to access and the maximum size of the document cache. Each of these elements of a mapping is described below.

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


Figure 4-5: Site Properties window

The elements of a mapping

Dynamo mappings include these elements:

URL prefix In Dynamo, URL prefix means any part of an URL immediately following the server name. For example, in the following address, /this is a URL prefix.

http://www.sybase.com/this/that/other.stm

The remainder of the URL ( /that/other.stm ) refers to the position of the document that is mapped to the URL prefix /this .

If you are using ISAPI Web servers, you can use the above URL format or you can use the longer version displayed below, which directly calls dyisa03.dll.

http://server/alias/dyisa03.dll/this/that/other.stm

For more information, see "Using the ISAPI filter".

Dynamo site type The type of document to which the URL prefix refers.

There are three Dynamo site types:

For more information, see "Defining mappings for database-hosted sites" and "Defining a mapping for file-based sites".

Site location The location of the site corresponding to the URL prefix.

The site location for a database hosted Web site is the name of a Sybase Central connection profile. Connection information is stored in the Registry.

The site location for a file-based Web site is a folder name on a drive available to the Web site machine.

Document cache size The maximum amount of memory to reserve for your document cache.

Java cache size The maximum amount of memory to reserve for your Java cache.

Java classpath Class files that are stored in a database must have their class path specified in Sybase Central for the class file to be found. Database class paths may be set per mapping from the Configuration folder in Sybase Central.

The mapping and Dynamo site name must be the same.

Class files that are stored in a file-based Web site can also use this field to set the Java classpath.

Defining mappings for database-hosted sites

Steps To define a mapping for a database-hosted site:

  1. Use Sybase Central to create a PowerDynamo connection profile for the Web site.

    For more information, see "Creating a connection profile for your Web site".

  2. From the Utilities folder, open the Dynamo Configuration folder.

  3. Open the Mappings folder and double-click Add Mapping.

  4. In the URL prefix field, enter the name to use for URLs to access the site. For example, if you want the index.html document to be addressed as:

    http://server-name/db_site/index.html


    then enter /db_site as the URL prefix.

  5. Select Database from the list of Dynamo site types.

  6. To define the resource, click Browse, and select the profile from the list of available Sybase Central profiles.

  7. Enter the desired cache size for your documents.

  8. Enter the desired cache size for your Java classes.

  9. If you have Web sites that access Java class files from within a database enter the classpath for the mapping. Dynamo cannot find the class files unless the location is specified here.

  10. Restart the server.


Defining a mapping for file-based sites

Steps To define a mapping for a file-based site:

  1. Open the Dynamo Configuration folder from the Sybase Central Utilities folder.

  2. From the Mappings folder, double-click Add Mapping.

  3. In the URL prefix field, enter the name for URLs to access the site. For example, if you want the index.html document to be addressed as:

    http://server-name/file_site/index.html


    then enter /file_site as the URL prefix.

  4. Select Dynamo site types. Chose Dynamic if you want Dynamo to produce dynamic content from templates and scripts. Chose Static to return static HTML documents.

  5. To define the resource, click Browse, and select the folder containing the documents from the expandable list. Click OK twice to save the mapping.

  6. Enter the desired cache size for your documents.

  7. Enter the desired cache size for your Java classes.

  8. If you have Web sites that access Java class files from within a database enter the classpath for the mapping. Dynamo cannot find the class files unless the location is specified here.

  9. Restart the server.


To edit a mapping, double-click on the mapping and make the necessary changes. Click OK to save the changes.

To delete a mapping, right-click the mapping and select Delete.

 


Copyright © 1999 Sybase, Inc. All rights reserved.