4.6 Configuring CGI Extensions

Common Gateway Interface (CGI) provides a method for Web servers to interact with external content-generating programs, which are often referred to as CGI programs or CGI scripts. It is the one of the simplest methods for adding dynamic content to your Web site.

Using Apache Manager, you can control how Apache finds the interpreter used to run CGI scripts. For example, if you specify sys:\foo.nlm as the path and .foo as the extension, all CGI script files with a .foo extension are passed to the foo interpreter (foo.nlm).

The CGI Extensions page in Apache Manager enables you add CGI extensions to your Web server.

Figure 4-4 Apache CGI Extensions

CGI Extensions page

To define CGI extensions:

  1. In the CGI Path field, specify the complete path to an interpreter used to run CGI scripts.

    On NetWare, you need to create an NLMâ„¢ that can serve as your CGI interpreter. Writing an NLM requires programming knowledge. If you are a developer, visit the Novell Developer Web site at http://developer.novell.com.

  2. In the Extension column, type the extension Apache should recognize as a CGI file.

    The default extension is .cgi.

  3. Click Add.

  4. Click Save > Save to save your changes.

    or

    Click Save > Save and Apply to save your changes and restart Apache so your changes are immediately put into effect.

    For information about where configuration information is stored, see Section 2.3.3, Saving Configuration Changes and Restarting Apache in Apache Manager.

To edit a defined CGI path and extension:

  1. Click Edit in the row of the CGI extension you want to modify.

    If there are no CGI extensions listed below the Add CGI Extension section, none have yet been defined. Define one following the instructions above.

  2. Change the extension as needed.

  3. Click Save > Save to save your changes.

    or

    Click Save > Save and Apply to save your changes and restart Apache so your changes are immediately put into effect.

    For information about where configuration information is stored, see Section 2.3.3, Saving Configuration Changes and Restarting Apache in Apache Manager.

To remove a CGI extension:

  1. Click Remove in the row of the CGI extension that you want deleted.

  2. Click Remove.

  3. Click Save > Save to save your changes.

    or

    Click Save > Save and Apply to save your changes and restart Apache so your changes are immediately put into effect.

    For information about where configuration information is stored, see Section 2.3.3, Saving Configuration Changes and Restarting Apache in Apache Manager.

For a more thorough discussion of CGI on Apache, see Apache Tutorial: Dynamic Content with CGI on the Apache.org Web site.