• No results found

Setting Up NSAPI

Setting up NSAPI is slightly different on Windows NT and UNIX. This section contains a procedure for each set up.

Windows NT

This procedure assumes that you’ve installed the Netscape server and configured its CGI-BIN directory.

Note - You must use a forward slash (/) in the filename strings.

1 Go to the Netscape server’s config subdirectory.

For example, if the Netscape server software is in

c:\Programs\netscape\server, and the default server is https-Httpd-80, you would go to

c:\Programs\netscape\server\https-Httpd-80\config. 2 Open obj.conf for editing.

3 Find this line:

4 After the above line, add the following two lines:

Init fn="load-modules" funcs="hsMsgsDummyInit" shlib= _

"drive:/HAHTsiteInstallDir/cgibin/hsmsgs40.dll"

Init fn="load-modules" funcs="pfx2hsrun,run-hsrun" _ shlib="drive:/HAHTsiteInstallDir/cgibin/hsrunns30.dll"

where drive is the drive where you installed the Application Server and HAHTsiteInstallDir is the Application Server’s installation directory.

Note - If you are running a Netscape version 3.5 or 3.6 Web server, add the above line to your obj.conf file, substituting

“hsrunns35.dll” for “hsrunns30.dll.”

These lines load the messages DLL and the NSAPI DLL version of hsrun. 5 In the section <Object name="default">, find this line:

NameTrans fn="pfx2dir" from="/cgi-bin" dir="path_to_cgi"

name="cgi"

6 Before the above line, add:

NameTrans fn="pfx2hsrun" from="/cgi-bin" _ dir="drive:/HAHTsiteInstallDir/cgibin" _ name="hsrunns30.dll" hsrun="hsrun.hse"

where drive is the drive where you installed the Application Server and HAHTsiteInstallDir is the Application Server’s installation directory.

Note - If you are running a Netscape version 3.5 or 3.6 Web server, add the line as above, substituting “hsrunns35.dll” for

“hsrunns30.dll.”

This line causes hsrun to look for its special signature before looking for general CGI scripts. The Application Server returns “not found” errors if the NSAPI filter line is placed after the CGI filter line. hsrun translates /cgi-bin/hsrun.hse to the path drive:/HAHTsiteInstallDir/cgi-bin/hsrunns30.dll and sets an internal object type to hsrunns30.dll, which tells the Application Server to perform further processing using the object section of that name.

7 At the end of the file (right after the cgi object section), add a new object section as follows:

<Object name="hsrunns30.dll">

ObjectType fn="force-type" type="magnus-internal/hsrunns30.dll"

Service fn="run-hsrun"

</Object>

Appendix A: Setting up NSAPI, ISAPI, and the Oracle Cartridge

Note - If you are running a Netscape version 3.5 or 3.6 Web server, add the object section as above, substituting

“hsrunns35.dll” for “hsrunns30.dll.”

This section forces the MIME type to a special internal type that goes with the NSAPI DLL. This section also specifies the service function to process the request.

UNIX

Note - When you install the Application Server, the UNIX setup script performs the configuration described in this section. The information is provided here as reference.

This procedure assumes that you’ve installed the Netscape server and configured its CGI-BIN directory.

Note - The shared-library extensions differ among UNIX platforms (e.g., on HP, the extension is “.sl”). This procedure uses Solaris as an example.

1 Go to the Netscape server’s config subdirectory and open obj.conf for editing.

2 In the section that contains the “load-modules” lines, find this line:

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

3 After the above line, add the following line:

Init fn="load-modules" funcs="hsrun-init,pfx2hsrun,run-hsrun" _ shlib="/HAHTsiteInstallDir/cgibin/hsrunns.so"

where HAHTsiteInstallDir is the Application Server’s installation directory. This line loads the hsrun NSAPI shared library.

4 In the section that contains the "init" functions, add the following line:

Init fn="hsrun-init" hsrun-path="/HAHTsiteInstallDir/cgibin"

where HAHTsiteInstallDir is the Application Server’s installation

directory. This routine initializes the hsrun code and specifies the location of the messages file, which is read as a regular file.

5 In the section <Object name="default">, find this line:

NameTrans fn="pfx2dir" from="/cgi-bin" dir="path_to_cgi"

name="cgi"

6 Before the above line, add:

NameTrans fn="pfx2hsrun" from="/cgi-bin" _ dir="/HAHTsiteInstallDir/cgibin" name= _

"hsrunns.so" hsrun="hsrun.hse"

where HAHTsiteInstallDir is the Application Server’s installation directory. This line causes hsrun to look for its special signature before looking for general CGI scripts. The Application Server returns “not found”

errors if the NSAPI filter line is placed after the CGI filter line. hsrun translates /cgi-bin/hsrun.hse to the path HAHTsiteInstallDir/cgi-bin/hsrunns.so and sets an internal object type to hsrunns.so, which tells the Application Server to perform further processing using the object section of that name.

7 At the end of the file (right after the cgi object section) add a new object section as follows:

<Object name="hsrunns.so">

ObjectType fn="force-type" type="magnus-internal/hsrunns.so"

Service fn="run-hsrun"

</Object>

This section forces the MIME type to a special internal type that goes with the Application Server’s NSAPI DLL. This section also specifies the service function to process the request.

Related documents