Sun Java System Web Server 6.1 SP9 Administrator's Guide

Specifying a CGI Directory

To specify a CGI-only directory for a class of virtual servers, perform the following steps

ProcedureTo specify a CGI-only directory for a class of virtual servers

  1. From the Class Manager, choose the Programs tab.

    The CGI Directory window appears.

  2. In the URL Prefix field, type the URL prefix to use for this directory. The text you type appears as the directory for the CGI programs in URLs.

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

    http://yourserver.domain.com/cgi-bin/program-name


    Note –

    The URL prefix you specify can be different from the real CGI directory you specify in the previous step.


  3. In the CGI Directory text field, type the location of the directory as an absolute path. This directory doesn’t have to be under your document root. This is the reason that you need to specify a URL prefix in the next step.

  4. Click OK.

  5. Save and apply your changes.

    To remove an existing CGI directory, click that directory’s Remove button in the CGI Directory form. To change the URL prefix or CGI directory of an existing directory, click that directory’s Edit button.

    Copy your CGI programs into the directories you’ve specified. Remember that any files in those directories will be processed as CGI files, so don’t put HTML files in your CGI directory.

Configuring Unique CGI Attributes for Each Software Virtual Server

To specify CGI attributes for a single virtual server, perform the following steps

ProcedureTo specify CGI attributes for a single virtual server

  1. From the Class Manager, choose the Manager Virtual Servers button.

  2. From the Virtual Server Manager, choose the Settings link.

  3. In the CGI User text field, type the name of the user to execute CGI programs as.

  4. In the CGI Grouptext field, type the name of the group to execute CGI programs as.

  5. In the CGI Directory text field, type the directory to chdir to after chroot but before execution begins.

  6. (UNIX only) In the CGI Nice text field, type an increment that determines the CGI program’s priority relative to the server. Typically, the server is run with a nice value of 0 and the nice increment would be between 0 (the CGI program runs at same priority as server) and 19 (the CGI program runs at much lower priority than server). It is recommended that you do not increase the priority of the CGI program above that of the server by specifying a nice increment of -1.

  7. In the Chroot Directory text field, type the directory to chroot to before execution begins.

  8. Click OK.

  9. Save and apply your changes.