ContentsIndexPreviousNext

8.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, 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 name of the directory 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 Execute (including script) option button.

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

8. Select the App Mappings tab.

9. Click Add.

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

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

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

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

13. Click OK to close the Add dialog box, OK to close the Configuration dialog box, and 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: Do not attempt this procedure unless you are an 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 followed by a space and "%s". For example:

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

5. Restart the WWW service.

Although configuration procedures vary with Web server platforms, 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 can affect other COBOL programs as well.

More:

8.6.1 "-f" Runtime Option

8.6.2 A_CGI Environment Variable