CGI: Common Gateway Interface

Note: This page is no longer maintained. It is left here for historical purposes. Unfortunately, over time, some links may break that are not maintained by the entities managing those resources.

An HTTP server is often used as a gateway to a legacy information system; for example, an existing body of documents or an existing database application. The Common Gateway Interface is an agreement between HTTP server implementors about how to integrate such gateway scripts and programs.

It is typically used in conjunction with HTML forms to build database applications.

See also: WWW and OOP for more on building distributed applications on the web.

Specs and Documentation

CGI 1.2 specification (in progress)
This directory is the repository for the effort (reactivated in November of 1997) to turn the de facto Common Gateway Interface "standard" into an actual Informational RFC.
The WWW Common Gateway Interface Version 1.1
16th October 1995. David Robinson. An attempt to update the CGI spec.
Apache Module mod_cgi
Using CGI in the CERN httpd
Configuring CERN httpd to use CGI scripts with the Exec directive.
Setting up CGI in NCSA httpd
A description of using CGI scripts with the NCSA httpd, using ScriptAlias and CGI files.


This newsgroup is a good place to find example scripts and discuss problems with other CGI developers.
If you have technical comments or questions about the development of the CGI spec itself, www-talk is a good place for them.

Next-Generation APIs

See also: WWW and OOP for info on using CORBA and ILU in place of CGI.

using the CGI programming model in combination with multiplexed network connections.
ILU Requestor
an approach using distributed objects
Apache API
Oracle's distributed HTTP server technology

See also: Programming the Web: A search for APIs at WWW5.

(updated slightly, 2009-05-29 by Liam Quin)
last update: $Date: 2011/05/12 07:49:31 $