Previous Contents Index Next
Sun ONE Web Server 6.1 Administrator's Guide

> ## The Programs Tab

> The Programs tab allows you to run server-side applications. The Programs tab contains the following pages:

> - The CGI Directory Page
> - The CGI File Type Page
> - The Query Handler Page
> - The WinCGI Directory Page
> - The ShellCGI Directory Page

> ##

> The CGI Directory Page

> The CGI Directory page allows you to specify the directory in which CGI programs are stored. For more information about CGI programs, see Installing CGI Programs.

> The following elements are displayed:

> URL prefix. Specify the URL prefix for the CGI directory. The text entered in this field appears as the directory for the CGI programs in URLs.

> For example, if you enter cgi-bin as the URL prefix, then all URLs to these CGI programs will have the following structure:

> http://yourserver.domain.com/cgi-bin/program_name

> The URL prefix you specify can be different from the “real” CGI directory specified in the CGI directory field.

> CGI directory. Specify the absolute path of the CGI directory. This directory does not need to be under the document root.

> OK. Saves your entries.

> Reset. Erases your changes and resets the elements in the page to the values they contained before your changes.

> Help. Displays online help.

> Current CGI directories. Lists all CGI directories currently defined for the server. To modify a CGI directory, click the Edit button in the directory row. To remove a CGI directory from the list, click the Remove button.

> Edit. Click this button to edit an existing CGI directory. Make your changes on the page that displays, and then click OK. To toggle back to Add mode, click the word Add in the edit page title.

> Remove. Click this button to remove a directory from the list of registered CGI directories. Note that the directory itself is not deleted, just the entry here.

> ##

> The CGI File Type Page

> The CGI as a File Type page allows you to associate a file extension with the shell CGI feature. This is different from creating an association in Windows. For more information, see Installing CGI Programs.

> The following elements are displayed:

> Editing. Select the resource you want to specify as a shell CGI type, and then click Go. If you choose a directory, all files in that directory will be treated as a shell CGI script. You can also browse for a resource by clicking the Browse button.

> Go. Click this button after selecting a resource.

> Browse. Click this button to browse your file system. Clicking Browse displays the Choose a Part of Your Server page (see The Choose a Part of Your Server Page). Clicking the Options button on this page displays browsing options. Clicking the Back button returns you to the previous page.

> Wildcard. Click this button to specify a wildcard pattern. For information about using wildcard patterns, see Wildcards Used in the Resource Picker.

> Activate CGI as a file type? Specify whether to activate CGI as a file type. Selecting Yes activates CGI as a file type and associates a file extension with the shell CGI feature in the server, such as an association for files with the .pl extension. When the server gets a request for a file with that extension, the server knows to treat the file as a shell CGI file by calling the executable associated in Windows with that file extension. If you activated CGI, WinCGI, and shell CGI file types, you must specify a unique suffix for each type of CGI. For example, you cannot use the suffix .exe for both a CGI program and a shell CGI program.

> OK. Saves your entries.

> Reset. Erases your changes and resets the elements in the page to the values they contained before your changes.

> Help. Displays online help.

> ##

> The Query Handler Page

> The Query Handler page allows you to specify a default query handler CGI program. For more information, see Using the Query Handler.

> A query handler processes text sent to it via the ISINDEX tag in an HTML file. ISINDEX is similar to a text field on a page in that it creates a text field in the HTML page that can accept typed input. Unlike information in a page text field, however, information in the ISINDEX field is immediately submitted when the user presses Return. When you specify a default query handler, you tell the server to which program input should be directed. For a detailed discussion of the ISINDEX tag, see an HTML reference manual.

> The following elements are displayed:

> Editing. Use the drop-down list to specify a resource to edit, and then click Go. If you choose a directory, the query handler you specified runs only when the server receives a URL for that directory or for any file in that directory. You can also browse for a resource by clicking the Browse button.

> Go. Click this button after selecting a resource.

> Browse. Click this button to browse your file system. Clicking Browse displays the Choose a Part of Your Server page (see The Choose a Part of Your Server Page). Clicking the Options button on this page displays browsing options. Clicking the Back button returns you to the previous page.

> Wildcard. Click this button to specify a wildcard pattern. For information about using wildcard patterns, see Wildcards Used in the Resource Picker.

> Default Query Handler. Specify the absolute path for the CGI program used as the default for the chosen resource.

> OK. Saves your entries.

> Reset. Erases your changes and resets the elements in the page to the values they contained before your changes.

> Help. Displays online help.

> ##

> The WinCGI Directory Page

> The WINCGI Directory page (Windows only) allows you to create a directory that contains only Windows CGI programs.

> For more information, see the following sections:

> - Installing Windows CGI Programs
> - Specifying a Windows CGI Directory
> - Specifying Windows CGI as a File Type

> The following elements are displayed:

> URL prefix. Specify the URL prefix you want to use for the WinCGI directory. The text you enter appears as the directory for the Windows CGI programs in URLs.

> For example, if you enter wcgi-programs as the URL prefix, then all URLs to these Windows CGI programs will have the following structure:

> http://yourserver.domain.com/wcgi-programs/program_name

> The URL prefix you specify can be different from the “real” Windows CGI directory specified in the WINCGI directory field.

> WINCGI directory. Specify the location of the CGI directory as an absolute path. This directory does not need to be under the document root.

> Enable Script Tracing? Specify whether your server will use 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 select Yes to 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.

> OK. Saves your entries.

> Reset. Erases your changes and resets the elements in the page to the values they contained before your changes.

> Help. Displays online help.

> Current WINCGI directories. Lists all Windows CGI directories currently defined for the server. To modify a directory, click the Edit button in the directory row. To remove a directory from the list, click the Remove button.

> Edit. Click this button to edit an existing Windows CGI directory. Make your changes on the page that displays, and then click OK. To toggle back to Add mode, click the word Add in the edit page title.

> Remove. Click this button to remove a directory from the list of registered Windows CGI directories. The directory itself is not deleted, just the entry here.

> ##

> The ShellCGI Directory Page

> The Shell CGI Directory page (Windows only) allows you to create a directory in your server’s document root that contains only shell CGI files. For more information, see Installing Shell CGI Programs for Windows.

> The following elements are displayed:

> URL prefix. Specify the URL prefix associated with your shell CGI directory. For example, if you store all shell CGI files in a directory called C:/docs/programs/cgi/shell-cgi, but you want users to see the directory as http://www.yourserver.com/shell/, then type shell as the URL prefix.

> Shell CGI directory. Specify the absolute path to the directory you created to store the shell CGI files. Make sure that any files in the shell CGI directory also have file associations set in Windows. The server returns an error if it attempts to run a file for which there is no file extension association.

> Caution | The server must have read and execute permissions to this directory. For Windows, the user account the server runs as (for example, LocalSystem) must have rights to read and execute programs in the shell CGI directory.

> OK. Saves your entries.

> Reset. Erases your changes and resets the elements in the page to the values they contained before your changes.

> Help. Displays online help.

> Current Shell CGI directories. Lists all shell CGI directories currently defined for the server. To modify a directory, click the Edit button in the directory row. To remove a directory from the list, click the Remove button.

> Edit. Click this button to edit an existing shell CGI directory. Make your changes on the page that displays, and then click OK. To toggle back to Add mode, click the word Add in the edit page title.

> Remove. Click this button to remove a directory from the list of registered shell CGI directories. The directory itself is not deleted, just the entry here.

> Previous Contents Index Next

> Copyright 2004 Sun Microsystems, Inc. All rights reserved.