The web server receives a request just like any other, but notes that this URL does not map to a flat file, but instead somehow to a scripting area.
Example: GET /cgi-bin/script.cgi?name=value HTTP/1.1
(All the CGI Programs to be executed by the HTTP server are kept in a pre-configured directory. This directory is called CGI directory and by convention it is named as /var/www/cgi-bin. By convention CGI files will have extension as .cgi, though they are a PERL, Shell, C or C++ executable.)
The server then starts the script, feeding it all the information contained in the request headers and URL. The script then runs and produces as its output the HTML and HTTP headers to be returned to the client, which the server takes care of.
Subtasks:
Generate some scripts to be run
Executes the Script: Launches the CGI script specified in the request.
The web server receives a request just like any other, but notes that this URL does not map to a flat file, but instead somehow to a scripting area.
Example: GET /cgi-bin/script.cgi?name=value HTTP/1.1
(All the CGI Programs to be executed by the HTTP server are kept in a pre-configured directory. This directory is called CGI directory and by convention it is named as /var/www/cgi-bin. By convention CGI files will have extension as .cgi, though they are a PERL, Shell, C or C++ executable.)
The server then starts the script, feeding it all the information contained in the request headers and URL. The script then runs and produces as its output the HTML and HTTP headers to be returned to the client, which the server takes care of.
Subtasks: