ContentsIndexPreviousNext

7.6 Configuring the Web Server

In order to map CGI programs with the .acu extension to run with the ACUCOBOL-GT runtime ("wrun32.exe"), some Web servers must be specially configured. Although we have included helpful suggestions in this section for configuring Web server products for this purpose, please be aware that Acucorp is unable to support Web server configuration efforts. Configuration procedures vary with each Web server product, so be sure to refer to your Web server documentation for specific details.

If your Web server software is NT Internet Information Server (IIS) 4.0, then you associate your .acu applications with the runtime as follows:

1. Start the Microsoft Management Console utility that comes with IIS. You can find it under Start/ Programs/ Windows NT 4.0 Option Pack/ Microsoft Internet Information Server/ Internet Service Manager.

2. Expand the console tree so that you are viewing "Console Root/ Internet Information Server/ Default Web Site" in the left pane of the console.

3. In the left pane, click the directory name where you stored your CGI scripts.

4. Select "Action/ Properties" (or press <Alt> <Enter>).

5. In the Properties sheet, select the "Directory" tab.

6. Near the bottom of the Directory tab, select the radio button labeled "Execute (including script)".

7. Click the "Configuration" button. If this is disabled, click "Create" first.

8. Select the "App Mappings" tab.

9. Click the "Add" button.

10. Enter the path to the ACUCOBOL-GT runtime, "wrun32.exe", or browse to it.

11. Add your desired command line options followed by " %s " to the path. For instance:

c:\acucorp\acucbl500\acugt\bin\wrun32.exe -f %s

12. Type the filename extension for your CGI script, ".acu".

13. Click "Ok" to exit the "Add" dialog box, "Ok" to exit the "Configuration" dialog box, then "Ok" a third time to close the "Properties" sheet.

14. Restart the WWW service.

If you do not have access to the Microsoft Management Console utility, you can configure IIS by editing your system registry directly as described below.


Caution: Only attempt this procedure if you are experienced Windows system administrator, as mistakes can result in system failure. Before editing your system registry, perform a full system backup using a backup program such as Windows NT Backup. Acucorp accepts no liability for damage or loss incurred as a result of altering the system registry.
1. Start Regedt32.exe and open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ScriptMap.

2. From the Edit menu, choose Add Value. The Data type is REG_SZ.

3. Type the filename extension used for your CGI script, ".acu".

4. In the String editor, type the full path to the runtime used with that script, including command line options and " %s". For example:

c:\acucorp\acucbl500\acugt\bin\wrun32.exe -f %s

5. Restart the WWW service.

Although configuration procedures vary with Web server platform, each Web server shares one characteristic: if a CGI program attempts any operation that waits for a user response, it will cause the CGI process to "hang." At best this wastes system resources. At worst, it may cause the entire Web server to "hang." Even if your code does not wait for user input, there may be some cases when the runtime displays a message box even before loading the COBOL program, or when shutting down due to an error that is not handled by the COBOL program.

Therefore, to avoid problems with the Web server when running your CGI program, you should configure the Web server in one of two ways: using the "-f" command line option at runtime or configuring the environment with the A_CGI environment variable. We recommend that you use the "-f" option, because environment variables could affect other COBOL programs as well.

More:

7.6.1 "-f" Runtime Option

7.6.2 A_CGI Environment Variable