Search Google Appliance

Information Technology

Request & Configure a CGI-enabled Web Site

As of September 1, 2014, CGI-enabeld Web sites will no longer be offered as a service at UMass Amherst.

About CGI-enabled Web Sites

Web site administrators can use OIT's CGI server to add CGI (Common Gateway Interface) forms to their Web sites. Access to the CGI server is only available to Information Providers who maintain department, organization, or course-related Web sites, and is not available for personal Web pages.

Terms of Use

As of August 31, 2011, OIT is no longer creating new accounts on the CGI server. Members of the UMass Amherst community with accounts created prior to August 31, 2011 can continue to access and use the CGI server.

How do I upload CGI scripts to the CGI server?

As of May 14, 2008, OIT hosts CGI scripts on a new server, To upload your scripts:

  1. Set up your SFTP software to connect to Note: OIT does not accept FTP connections.
  2. Use your NetID (OIT Account user name) and password to log in to the server.
  3. Your public_html folder will be created automatically for you the first time you log in. This folder and any files placed in it will be set with public permissions.

How does the CGI server work?

Any Information Provider who wants to use the CGI server will continue to use their normal Web server, but will store their CGI scripts and related files on the CGI server (

For example, if an Information Provider wants to add a form to their Web site, they store the CGI form script on the CGI server, but call that script from an HTML page on their UMass departmental or course Web site.

Sample HTML code

<html><head><title>Sample Form</title></head><body><form action= method=get><br>First Name:<input type="text" name=FirstName maxlength=40 size=40><br> Last Name:<input type="text" name="LastName maxlength=40 size=40><br> < input type="submit"> <input type="reset"> < /form></body></html>

The above HTML code would be stored on OIT's public Web server ( and would refer to a CGI script (form.cgi) on OIT's CGI server (

What scripting language is preferred?

OIT strongly encourages that all scripts be written in PERL. Special exceptions may be made for programs that must be written in C. Scripts written in shell languages (sh, csh, ksh, etc.) are not permitted.

Helpful Hints

Note: There is a space between cd and the first backslash (/).

The access_log file contains a single line entry for every attempt to retrieve a file from the server.

The cgi.log file contains a single line entry for every attempt to execute a CGI script.

The error_log file records failed attempts to read files which do not exist. Note: Log files are rotated every Sunday. Log files from the previous 5 weeks are saved in the /usr/local/apache/logs/ directory in GZIP format with the suffix .[1-5]

  • Remember: all CGI scripts must be located under the public_html directory in the Information Provider's home directory on and must end with the suffix .cgi.
  • URLs directed to CGI scripts should have this format: (where netid is your OIT Account user name and script is the name of your cgi script).
    Or, if you have scripts in a subdirectory under public_html: (where netid is your OIT Account user name, subdirectory is the name of the subdirectory and script is the name of your cgi script).
  • To access your Apache server logs: Type cd /usr/local/apache/logs/ from any prompt on