This section discusses how to install Windows CGI Programs. The following topics are included in this section:
Windows CGI programs are handled much as other CGI programs. You specify a directory that contains only Windows CGI programs, or you specify that all Windows CGI programs have the same file extension. Like other CGI programs, you can use both methods at the same time if you want to. For example, you can create a directory for all your Windows CGI programs, and specify a Windows CGI file extension.
Although Windows CGI programs behave like regular CGI programs, your server processes the actual programs slightly differently. Therefore, you need to specify different directories for Windows CGI programs. If you enable the Windows CGI file type, it uses the file extension .wcg.
Sun Java System Web Servers support the Windows CGI 1.3a informal specification, with the following differences:
The following keywords have been added to the [CGI] section to support security methods:
HTTPS: its value is on or off, depending on whether the transaction is conducted through SSL.
HTTPS Keysize: When HTTPS is on, this value reports the number of bits in the session key used for encryption.
HTTPS Secret Keysize: When HTTPS is on, this value reports the number of bits used to generate the server’s private key.
The keyword Document Root in the [CGI] section might not refer to the expected document root because the server does not have a single document root. The directory returned in this variable is the root directory for the Windows CGI program.
The keyword Server Admin in the [CGI] section is not supported.
The keyword Authentication Realm in the [CGI] section is not supported.
Forms sent with multi-part/form-data encoding are not supported.
From the Class Manager, choose the Programs tab.
Click the WinCGI Directory link.
The WinCGI Directory window appears.
In the URL Prefix text field, enter the URL prefix you want to use for this directory.
The text you type appears as the directory for the Windows CGI programs in URLs. For example, if you type wcgi-programs as the URL prefix, all URLs to these Windows CGI programs have the following structure:
The URL prefix you specify can be different from the real Windows CGI directory you specify in Specifying a Windows CGI Directory.
Choose whether you want to enable script tracing.
Click the Yes or No radio button under “Enable Script Tracing?”.
CGI parameters are passed from the server to Windows CGI programs through files, which the server normally deletes after the Windows CGI program finishes execution. If you enable script tracing, these files are retained in a /temp directory or wherever the environment variables TMP and TEMP are pointing. Also, any window that the Windows CGI program brings up is shown when script tracing is enabled.
In the WinCGI Directory field, enter the location of the directory as an absolute path.
Note that this directory doesn’t have to be under your document root. This is the reason that you need to specify a URL prefix in Specifying a Windows CGI Directory.
Save and apply your changes.
To remove an existing Windows CGI directory, click that directory’s Remove button in the Windows CGI Directory form. To change the URL prefix or Windows CGI directory of an existing directory, click that directory’s Edit button.
Copy your Windows CGI programs into the directories you’ve specified. Remember that any file in those directories is processed as a Windows CGI file.
From the Server Manager, choose the Server Preferences tab.
Click the MIME Types link.
The Global MIME Types window appears. For more information on the Global MIME Types, see Choosing MIME Types.
Add a new MIME type with the following settings:
Content type: magnus-internal/wincgi.
File Suffix: Enter the file suffixes that you want the server to associate with Windows CGI. If you activated CGI, WinCGI, and shell CGI file types, you must specify a different suffix for each type of CGI. For example, you can’t use the suffix .exe for both a CGI program and a shell CGI program. If you need to, you can edit the other MIME type fields on the page so that the suffixes are unique.
Click the New Type button.
Save and apply your changes.