Sun Java System Web Server 7.0 Update 4 Administrator's Guide

Specifying Windows CGI as a File Type

You can use the Sun Java System Web Server MIME Types window to associate a file extension with the shell CGI feature. This process is different from creating an association in Windows. To associate a file extension with the shell CGI feature in the server for example, you can create 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.

To specify a file extension for Windows CGI files, perform the following steps.

ProcedureTo Specify a File Extension for Windows CGI files

  1. Create the shell directory on your computer. This directory does not have to be a subdirectory of your document root directory.

  2. Go to Common Tasks > Configurations (Select configuration) > General >Mime Types (sub tab)

  3. Click the New button to create a mime type.

    A new window appears.

  4. Add a new mime type with the following settings:

    • Mime Header: Select the mime header from the following Content-type, Content-encoding, Content-language

    • MIME Value: magnus-internal/wincgi.

    • File Suffix: Enter the file suffixes that you want the server to associate with shell CGI. If you activated CGI, WinCGI, and shell CGI file types, you must specify a different suffix for each type of CGI. For example, you cannot use the suffix .exe for both a CGI program and a shell CGI program. If you need to, you can edit the other MIME type fields on the page so that the suffixes are unique

  5. Click OK.