Release 4.0 of the Directory Server supports multiple gateway instances. Many gateways can access directory data from the same HTTP server without conflict.
The .conf files defining the configuration of gateway instances are stored in <NSHOME>/dsgw/context. Within the .conf file are two parameters specifying the path names for the HTML and template files for the gateway (see Example 1.1).
Example 1.1 HTML and configuration directories specified in pb.conf
htmldir ../pbhtml
configdir ../pbconfig
Specifying Gateway Configuration to Gateway CGIs
Information about which .conf file to use is communicated in the QUERY STRING using a GET, and through a hidden variable on a POST.
GET Operations (GCONTEXT)
In a GET operation, gateway CGIs get the gateway context from the QUERY STRING in the URL.
Use the GCONTEXT directive in all URLS to gateway CGIs. Embed <!--GCONTEXT --> after the CGI name, as shown in Example 1.2. This directive will be replaced by the current CGI's gateway context. The GCONTEXT directive is the only gateway directive that does not have to be at the beginning of the line.
Example 1.2 Embedding GCONTEXT in a Link
<a href=/dsgw/bin/lang?<!-- GCONTEXT -->&file=auth.html>click</a>
Gateway 3.x Note
In release 3.x, CGIs passed their arguments using PATH_INFO. In 4.0, PATH_INFO is replaced by the QUERY_STRING, which works better with the Japanese version of Windows NT, and is functionally equivalent.
POST Operations (PCONTEXT)
In a POST operation, the CGI posts to the gateway instance specified by a hidden variable on an HTML form. Each POST operation to a gateway CGI in an HTML form must use the PCONTEXT directive so that CGIs can pass the gateway instance to the next page and maintain the state.
For CGI invocations using a POST, put <!-- PCONTEXT --> at the beginning of a line, as shown in Example 1.3.
Example 1.3 Specifying PCONTEXT in an HTML Form
<form method=post action=/dsgw/bin/dosearch>
<input type=hidden name=dn value="">
<!-- PCONTEXT -->
</form>
See Also
"Context-Related Directives" on page 95
URLs for Gateway Access
The URL customers use to access a 4.0 gateway differs from the URL customers use to access a 3.x gateway.
Release 4.0
To get to a 4.0 gateway, users enter the following URL:
http://adminhost:adminport/dsgw/bin/lang?context=<context>
The default gateway and Directory Express are available from the page for the Netscape Administration server (http://host:port)
Release 3.x
To get to a 3.x gateway, users enter the following URL:
http://host:port/dshtml