CSP Gateway Configuration Guide - InterSystems Documentation

intersystems.com

CSP Gateway Configuration Guide - InterSystems Documentation

Making a CSP Page the Home Page for the Web Server

cd c:\inetpub\wwwroot

md csp

cd csp

md samples

cd samples

copy con menu.csp

^Z

2.5.2 Sun Web Servers

The procedure described in this section is only available with Gateway build 663.763 (and later).

The following directive specifies the home page for a Sun server in the default section of obj.conf:

NameTrans fn="home-page" path="/csp/samples/menu.csp"

This directive, however, does not result in the CSP form menu.csp becoming the home page for the server. The reason for

this is that the server does not update the environment variables relating to the page requested before transferring control

to the CSP Gateway. The Gateway sees the incoming request as a request for / instead of /csp/samples/menu.csp. Netscapebased

servers expect NSAPI extensions to accept the responsibility for recognizing this scenario and update the variables

identifying the page requested and its path accordingly. You can work around this behavior as follows:

1. Define the CSP home page in the default section of obj.conf:

NameTrans fn="home-page" path="/csp/samples/menu.csp"

2. The section that describes the mapping between CSP files and the Gateway modules must be modified to include the

home-page-path directive as follows:


Service method=(GET|HEAD|POST) fn=csp_req \

home-page-path="/cache-install-dir/csp/samples"

\


Service method=(GET|HEAD|POST) fn=csp_req \

home-page-path="/cache-install-dir/csp/samples"

\


Service method=(GET|HEAD|POST) fn=csp_req \

home-page-path="/cache-install-dir/csp/samples"



Service method=(GET|HEAD|POST) fn=csp_req_sys



Service method=(GET|HEAD|POST) fn=csp_req


It is not entirely necessary to specify the path to the home page in the home-page-path property within the Service directive,

but if you do, it results in the PATH_TRANSLATED environment variable taking the value that it would have done had

/csp/samples/menu.csp been requested directly. In other words, PATH_TRANSLATED for the home-page (/) is returned

as:

/install-dir/csp/samples/inspector.csp

instead of:

/csp/samples/inspector.csp

2.5.3 Apache Servers

Find the DirectoryIndex directive in the Apache configuration file. For example:

DirectoryIndex index.html index.html.var

Add the new default page for the web server at the head of the list:

CSP Gateway Configuration Guide 41

More magazines by this user
Similar magazines