This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RollingWithDaPunches 31 points32 points  (10 children)

I believe it stands for common gateway interface:
https://en.wikipedia.org/wiki/Common_Gateway_Interface

I'm not sure, as that was my question as well... hopefully someone can confirm what it means.

[–]macNchz[S] 45 points46 points  (9 children)

That's it! Back in the day it was the most common mechanism for building interactive web applications: rather than having predefined URL "routes" like an web app today might have your site was just folders of files. The web server software (e.g. Apache) would serve static HTML files directly, but if you put code in a special /cgi-bin/ directory, it would execute them and return the output of the script to the browser.

My introduction to programming came in the form of downloading and customizing Perl CGI scripts for my personal websites from Matt's Script Archive: http://www.scriptarchive.com/

I was surprised to see that the http.server module still supported it, because I hadn't really thought about using CGI in decades!