Where CGI Scripts Live

Like any other file on a server, CGI scripts must live somewhere. Depending on your server, CGI scripts might have to live in one special directory. Other servers let you put scripts anywhere you want.

Typically—whether required by the server or not—Webmasters put all the scripts in one place. This directory is usually part of the Web server's tree, often just one level beneath the Web server's root. By far, the most common directory name is cgi-bin, a tradition started by the earliest servers that supported CGI. UNIX hacks will like the "bin" part, but because the files are rarely named *.bin and often aren't in binary format anyway, the rest of the world rolls its eyes and shrugs. Today, servers usually enable you to ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.