The CGI module

The CGI module implements the Common Gateway Interface used on many web servers. Like the directory module, it's argument is a directory to check for the existence of files. Unlike the directory module, the files are not sent to the client. Instead, the file in that directory (AWS does not search subdirectories) is invoked as a CGI program. If the file does not exist, the server will continue processing map commands.

The CGI interface makes porting CGI programs from other servers straightforward. Many of those provided with the Amiga Web Server were written for use on NCSA httpd. A selections of CGI programs and documentation is included with the server.

Variance from spec

AWS varies from the CGI spec in two places:

  1. The spec says that a redirect from a CGI script to a file on the same server should be handled transparently by the server. This 1) causes browsers to break on relative links, and 2) makes automatic detection of such moves by robots impossible. As implemented, this will work with all browsers that follow the spec, and will work better in some cases. The cost is an extra respond/fetch, which I consider acceptable. If this implementation causes problems for you, please let me know.
  2. The spec includes PATH_TRANSLATED, but is vague about how it should behave. I've left it unset, and am trying to find out what I should be doing about it.

Mike Meyer