WebSpeed
Installation and
Configuration Guide
Configuring a CGI Messenger
Configuring a Messenger to access a CGI-compatible Web server requires only that you create a script file that the Web server uses to invoke the Messenger executable,
cgiip
. You do not have to change the configuration of your Web server. The script file performs these tasks:
- Sets WebSpeed environment variables described in Table 8–4
- Invokes the Messenger executable,
cgiip
You can find a sample file that you can use as the basis for a shell script to configure the script file at install-path
/bin/wspd_cgi.sh.
Here is an edited version of install-path/
bin/wspd_cgi.sh
:
The
wspd_cgi.sh
script provides and documents additional options for invoking the Messenger executable. You can, for example, specify the default WebSpeed service or use the-f
option to specify a named configuration file. Table 8–4 describes the various options.
NOTE: Specifying a WebSpeed service name in a URL overrides any settings in your Messenger script file.You can edit the script if you would like to see what information
cgiip
is sending to the browser for debugging purposes (including HTTP headers). Here is a sample script that shows how you might do this:
This script works as follows: After a request from a Web browser initiates this script, the script saves all of the CGI environment information in a file named
webapp.env
. The script sends its output not only to the browser but also to a file named/tmp/webapp.out
. You can look at/tmp/webapp.out
to see what was sent to the browser. The technique is useful for pinpointing problems that might be related more to the server than to your application. A clue that this might be the case is if your browser receives no output from your application and instead displays server errors.Remember that this script executes every time a browser makes a request. Thus, if multiple browsers make multiple simultaneous requests, the agents servicing the requests can overwrite each other’s output to the file. For this reason, you should use this technique only when you are debugging your application (typically with a controlled number of agents and browsers).
Where To Place the Messenger Script File
Typically, a Messenger script file, such as
wspd_cgi.sh
, resides in thecgi-bin
or equivalent directory that contains your Web server’s scripts. When you configure your Web server, you can decide which directories can hold executable files. You can also designate whether the executable files require a specific extension (such as.cgi
) or can use any extension. See your Web server documentation for details on how to configure a scripts directory and CGI programs.Most UNIX Web servers map URLs leading with
/cgi-bin
to acgi-bin
subdirectory. This subdirectory is located either under or parallel to the document root directory. Thecgi-bin
directory typically contains only executable files. This is an appropriate location to place your Messenger script file.Many UNIX Web servers allow CGI programs to reside in directories other than
cgi-bin
. However, some Web servers might require a specific extension. See your Web server documentation for more information.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |