Introduction to the CGI
What is it?
The Common Gateway Interface, or CGI, is an interface for running
external programs, or gateways, under an information server.
Currently, the supported information servers are HTTP servers.
What's a gateway used for?
What we refer to as gateways are really programs which handle
information requests and return the appropriate document or generate a
document on the fly. The ability to generate documents on the fly,
such as being able to generate a finger request and convert the result
to HTML, is what we refer to as gatewaying.
Gateways can be used for a variety of purposes, the most common being
the handling of ISINDEX and FORM requests for HTTP.
What are gateway programs?
Gateway programs, or scripts, are executable programs which can be run
by themselves (but you wouldn't want to). They have been made external
programs in order to allow them to run under various (possibly very
different) information servers interchangably.
What language can I write these gateways in?
Gateways conforming to this specification can be written in any
language which produces an executable file. Examples include C
programs, PERL scripts, Bourne shell scripts, and C shell scripts,
with many others.
Who came up with it?
The specification was discussed between the main HTTP server authors.
Credits go to:
- Tony Sanders sanders@bsdi.com
- Ari Luotonen luotonen@ptsun00.cern.ch
- George Phillips phillips@cs.ubc.ca
- John Franks john@math.nwu.edu
as well as countless others.
Return to the overview
Rob McCool
robm@ncsa.uiuc.edu