This article explains how to set up an IIS Web server to use with CSP (Caché
Server Pages) on a different computer from where Caché is installed. This document
refers to the Web server as
Machine W and to the computer running
Caché as
Machine C. The setup includes the following procedures:
-
-
-
-
Install Caché Shell on Web Server Machine
Install a minimal Caché shell on the Web server machine,
Machine
W. Reference the
Caché Installation Guide if
you need more detailed information. During the installation process, follow these
instructions:
This creates the
CSP directory structure on
Machine
W and creates virtual directory references for the
/CSP and
/CSP/Bin files
in IIS.
Manipulate CSP Initialization File
-
-
-
The
csp.ini file sets the
Default_Server to
LOCAL for
application paths beginning with
/ and
/csp.
This must be changed to reflect that Caché is actually located on a different
machine. You must also set up directories to point to all your application paths located
in the
Cache.cpf file located in the
CacheSys directory
on
Machine C. Information about the applications and paths you
are using is under the [CSP.APPLICATIONS] section at the very end of this file.
[SYSTEM]
Server_Response_Timeout=60
Queued_Request_Timeout=60
Run_Time_Script=CSPms.dll
[SYSTEM_INDEX]
LOCAL=Enabled
[LOCAL]
Ip_Address=127.0.0.1
TCP_Port=1972
[APP_PATH_INDEX]
/=Enabled
/csp=Enabled
[APP_PATH:/]
Default_Server=LOCAL
[APP_PATH:/csp]
Default_Server=LOCAL
NameSpace=Samples
[CSP.Applications]
CSPApp_1=/csp/samples,samples,1,1,,900,1,,SAMPLES,1,,,
CSPApp_2=/csp/user,user,1,1,,900,1,,USER,1,,,
CSPApp_3=/csp/pattaya,pattaya,1,1,,900,1,,PATTAYA,0,,,
CSPApp_4=/myapp,c:/cachesys/csp/myapp/,1,1,,900,1,,MYAPP,1,,,
An example of the altered
csp.ini file (changes/additions
indicated by comments):
[SYSTEM]
Server_Response_Timeout=60
Queued_Request_Timeout=60
Run_Time_Script=CSPms.dll
[SYSTEM_INDEX]
LOCAL=Enabled
CACHEMACHINE=Enabled // new line
[LOCAL]
Ip_Address=127.0.0.1
TCP_Port=1972
[CACHEMACHINE] // new line
Ip_Address=xxx.xxx.xxx.xxx // new line
TCP_Port=1972 // new line
[APP_PATH_INDEX]
/=Enabled
/csp=Enabled
/myapp=Enabled // new line
[APP_PATH:/]
Default_Server=CACHEMACHINE // changed server name
[APP_PATH:/csp]
Default_Server= CACHEMACHINE // changed server name
NameSpace=Samples
[APP_PATH:/myapp] // new line
Default_Server=CACHEMACHINE // new line
CACHEMACHINE is simply an internal name used in this
csp.ini file
and can be changed to another word.
You must specify the correct
Ip_Address of
Machine
C. If you changed the port on which the Caché SuperServer is running,
you must replace 1972 with that altered port number.
The changes added for the path
/myapp is for the special
application path previously discussed in the
Cache.cpf file.
Replace
myapp with the names of your applications as found in
Cache.cpf.
You may add more than one. If you do not have any special application paths, simply
ignore these changes. Optionally, you could add this application using the
CSP
Gateway Configuration Manager instead of manually in this file by accessing
http://localhost/csp/bin/cspmssys.dll.
Create Directories on Web Server
To properly serve CSP pages, create empty directories on
Machine W representing
your namespaces. These empty directories must exist for your Web server to function
properly. You
do not have to place any CSP files here; they reside
on
Machine C.
In the future, if you add a new namespace on
Machine C which
may contain CSP pages, you must create another empty directory of the same name on
Machine
W.
Add virtual directories to IIS for any applications that have a special application
path, for example,
/myapp.
If you do not have an application path resembling
/myapp in
the previous examples, ignore this step. You must set it up with properties similar
to the
/csp virtual directory which is automatically created
for you by the CSP installation.