CGI Server-Side Scripting

Common Interface Gateway is a technology that allows webservers to execute scripting languages (on the server side) in order to generate dynamic HTML content. Essentially the webserver passes information about the web request to the script via environment variables and stdin. The generated response is then returned via stdout. Any language that can handle stdin, stdout and environment variables is capable of being used for CGI scripting.

The links below give some boiler-plate examples of various languages, running on Dreamhost. Dreamhost's webservers are configured to treat any file with extension .cgi as an executable CGI script.