Web Servers

The piece of software most integral to CGI programming is the Web server. The Web server handles all the requests sent by the Web browser, and retrieves the appropriate resource from disk and sends it back. It also executes CGI scripts when they’re requested, and handles authentication. There are a number of Web servers available, but the two most popular are Apache for UNIX, and Microsoft Internet Information Server (IIS) for Windows. Most Web servers are extremely similar in functionality.

Web-Server Directory Structure

It’s important to understand how the directories associated with a Web server are organized. Unless you understand the directory structure of the Web server, you won’t know where your CGI scripts should be placed. ...

Get Sams Teach Yourself CGI in 24 Hours, Second Edition 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.