Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 543 #569
i
i
i
i
i
i
i
i
22
The Apache Web Server
22.9.1 Server Side Includes: SSI
Server-side includes are directives that are embedded in special
comments and executed by Apache. The result is embedded
in the output. For example, the current date can be printed with
<!--#echo var="DATE_LOCAL" -->. The # at the end of the opening
comment mark <!-- shows Apache that this is an SSI directive and not a
simple comment.
SSIs can be activated in several ways. The easiest approach is to search all
executable files for SSIs. Another approach is to specify certain file types to
search for SSIs. Both settings are explained in Section 22.7.2 on page 540.
22.9.2 Common Gateway Interface: CGI
CGI is the abbreviation for common gateway interface. With CGI, the server
does not simply deliver a static HTML page, but executes a program that
generates the page. This enables the generation of pages representing the
result of a calculation, such as the result of the search in a database. By
means of arguments passed to the executed program, the program can re-
turn an individual response page for every request.
The main advantage of CGI is that this technology is quite simple. The pro-
gram merely must exist in a specific directory to be executed by the web
server just like a command-line program. The server sends the program
output on the standard output channel (stdout) to the client.
22.9.3 GET and POST
Input parameters can be passed to the server with GET or POST. Depend-
ing on which method is used, the server passes the parameters to the script
in various ways. With POST, the server passes the parameters to the pro-
gram on the standard input channel (stdin). The program would receive
its input in the same way when started from a console.
With GET, the server uses the environment variable QUERY_STRING to pass
the parameters to the program. An environment variable is a variable made
available globally by the system (such as the variable PATH, which contains
a list of paths the system searches for executable commands when the user
enters a command).
543
SUSE LINUX Enterprise Server