25.01.2015 Views

CSP Gateway Configuration Guide - InterSystems Documentation

CSP Gateway Configuration Guide - InterSystems Documentation

CSP Gateway Configuration Guide - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Web Servers for Microsoft Windows<br />

By the <strong>CSP</strong>FileTypes directive<br />

The <strong>CSP</strong>FileTypes directive works for requests for files that have extensions (such /csp/menu.csp). It does not work for<br />

requests for files that do not have file extensions (such as/csp/menu).<br />

This parameter is processed by the <strong>Gateway</strong>’s Apache modules and can be globally defined at the server definition level<br />

(in httpd.conf) or restricted within the definition for a location or directory block.<br />

By file type: The following directive requests that files of type .xxx and .yyy be processed by <strong>CSP</strong>.<br />

<strong>CSP</strong>FileTypes .xxx .yyy<br />

By location: The following requests that files of type .xxx and .yyy be processed by <strong>CSP</strong> but only for locations under /csp<br />

(including subdirectories, such as /csp/samples and so on).<br />

<br />

<strong>CSP</strong>FileTypes .xxx .yyy<br />

<br />

Using the wildcard character, the following requests that all files under path /csp (and /csp/samples and so on) be processed<br />

by <strong>CSP</strong>.<br />

<br />

<strong>CSP</strong>FileTypes *<br />

<br />

By MIME type<br />

In addition to recognizing the file extensions listed above, <strong>CSP</strong> can also recognize files for the following MIME types:<br />

application/x-csp<br />

and<br />

text/csp<br />

For example, to add the file extension xxx to the list of files processed by <strong>CSP</strong>, use:<br />

LoadModule csp_module_sa /cache-install-dir/csp/bin/<strong>CSP</strong>a22.dll<br />

AddType application/x-csp csp cls zen xxx<br />

One of the problems with using MIME types to associate types of file with <strong>CSP</strong> is that Apache checks to ensure that the<br />

path to the resource (that is, the hosting directory) physically exists, and returns a file not found error if it does not.<br />

It does not, however, check to ensure that the file requested physically exists – which is appropriate for resources served<br />

by <strong>CSP</strong> since they are served by Caché and are virtual as far as the web server is concerned. The “By MIME type” approach<br />

is therefore only suitable for cases where the application’s path structure can be replicated on the web server.<br />

3.4.2.2 Operating and Managing the <strong>Gateway</strong> with Apache API<br />

To access the <strong>CSP</strong> <strong>Gateway</strong>’s <strong>CSP</strong> Web <strong>Gateway</strong> Management page, point your browser at:<br />

http://localhost:/csp/bin/Systems/Module.cxw<br />

Notice the use of the cxw file extension. This extension prevents Apache attempting to load and run these DLLs through<br />

the Apache Group ISAPI interface. Also, remember that URL paths and files names are case-sensitive under Apache.<br />

If you see an Unauthorized User error message, refer to the section on “security considerations”.<br />

The <strong>CSP</strong> engine is automatically invoked for requested files that contain a .csp, .cls, or .zen extension. For example:<br />

http://localhost:/csp/samples/menu.csp<br />

72 <strong>CSP</strong> <strong>Gateway</strong> <strong>Configuration</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!