Web Development |
Panther web applications support NSAPI for HTTP processes.
Configuring Your NSAPI-Compliant Server |
In the following instructions, the HTTP server is installed at /usr/netscape/suitespot, and the cgi-bin directory is /usr/netscape/suitespot/cgi-bin/.
In order to install Panther NSAPI support:
prlldr.nsa
to /usr/netscape/suitespot/cgi-bin/
./usr/netscape/suitespot/http*/config/obj.conf
as follows:Init fn="load-modules" \
shlib="/usr/netscape/suitespot/cgi-bin/prlldr.nsa" \
funcs="prolifics,prolifics-init"
Init fn="prolifics-init"
<Object name=default>
, add the following preceding any line similar to NameTrans fn="pfx2dir" ... from="/"
:
NameTrans fn="pfx2dir" \
from="/prolifics"\
dir="/usr/netscape/suitespot/cgi-bin" \
name="prolifics"
</Object>
, add:
<Object name=prolifics>
ObjectType fn=force-type type=magnus-internal/prolifics
Service fn=prolifics
</Object>
/usr/netscape/suitespot/http*/config/mime.types
must also be modified. After the line type=magnus-internal/cgi exts=cgi,exe,bat
, add:
type=magnus-internal/prolifics exts=nsa
Accessing the Panther Web Application |
To access the Panther web application using NSAPI:
The simplest service syntax is:
monitor -start
AppName
net start
AppName
Note:
For applications previously deployed using CGI, be sure to update the URLs to access the Panther directory and the application's NSAPI executable.
http://HostName/prolifics/AppName.nsa/ScreenName
A Sample Obj.conf File |
The following obj.conf file illustrates the edits detailed in the previous section.
Init fn="load-modules" \
shlib="/usr/netscape/suitespot/cgi-bin/prlldr.nsa" \
funcs="prolifics,prolifics-init"
Init fn="prolifics-init"
Init fn=flex-init access="/usr/netscape/suitespot/https-myserver/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
<Object name=default>
# the following directive must precede any line similar to
# NameTrans fn="pfx2dir" ... from="/"
NameTrans fn="pfx2dir" \
from="/prolifics" \
dir="/usr/netscape/suitespot/cgi-bin" \
name="prolifics"
NameTrans fn=pfx2dir from=/ns-icons dir="/usr/netscape/suitespot/ns-icons"
NameTrans fn=pfx2dir from=/mc-icons dir="/usr/netscape/suitespot/ns-icons"
NameTrans fn="pfx2dir" from="/help" dir="/usr/netscape/suitespot/manual/https/ug"
NameTrans fn=document-root root="/usr/netscape/suitespot/docs"
PathCheck fn=unix-uri-clean
PathCheck fn="check-acl" acl="default"
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=prolifics>
ObjectType fn=force-type type=magnus-internal/prolifics
Service fn=prolifics
</Object>
<Object name=cgi>
ObjectType fn=force-type type=magnus-internal/cgi
Service fn=send-cgi
/Object>