This module makes it possible to expand "macros" embedded in
HTML pages before they are delivered to the client, that is
Server-Side Includes (SSI). To make this possible the server
parses HTML pages on-the-fly and optionally includes the current
date, the requested file's last modification date or the size
(or last modification date) of other files. In its more advanced
form, it can include output from embedded CGI and
Having the server parse HTML pages is a double edged sword! It can be costly for a heavily loaded server to perform parsing of HTML pages while sending them. Furthermore, it can be considered a security risk to have average users executing commands in the name of the Erlang node user. Carefully consider these items before activating server-side includes.
The server must be told which filename extensions to be used
for the parsed files. These files, while very similar to HTML,
are not HTML and are thus not treated the same. Internally, the
server uses the magic MIME type
to identify parsed documents. It will then perform a format
conversion to change these files into HTML for the
client. Update the
mime.types file, as described in the
Mime Type Settings section
httpd(3), to tell the server which extension to use
for parsed files, for example:
text/x-server-parsed-html shtml shtm
This makes files ending with
into parsed files. Alternatively, if the performance hit isn't a
problem, all HTML pages can be marked as parsed:
text/x-server-parsed-html html htm
All server-side include directives to the server are formatted as SGML comments within the HTML page. This is in case the document should ever find itself in the client's hands unparsed. Each directive has the following format:
<!--#command tag1="value1" tag2="value2" -->
Each command takes different arguments, most only accept one tag at a time. Here is a breakdown of the commands and their associated tags:
bytesfor a formatted byte count or
abbrevfor an abbreviated version displaying the number of kilobytes.
../cannot be used in this pathname, nor can absolute paths. As above, you can send other parsed documents, but you cannot send CGI scripts.
var, whose value is the name of the variable you wish to echo.
includecommand. The resulting format of this command is subject to the
sizefmtparameter to the
/bin/sh. All of the variables defined below are defined, and can be used in the command.
A number of variables are made available to parsed documents. In addition to the CGI variable set, the following variables are made available:
Uses the following EWSAPI interaction data, if available:
Exports the following EWSAPI interaction data, if possible:
MimeTypeas defined in the Mime Type Settings section of
Uses the following EWSAPI functions: