iTP Secure WebServer System Administrator's Guide (iTPWebSvr 5.1+)

Configuring the iTP Secure WebServer
iTP Secure WebServer System Administrator’s Guideβ€”522659-001
7-50
Setting Up a Server-Side Include (SSI)
After specifying SSI usage for specific regions, you need to tell the server the extension
of the files you want to be parsed for SSIs. Internally, the server uses the MIME type
text/x-server-parsed-html to identify files to be parsed. To tell the server which
extension you want to correspond to these files, you specify the
MimeType directive in
the mime-types.config file. For example, the server default is:
MimeType text/x-server-parsed-html shtml
This directive marks for parsing any file ending in .shtml.
The default MIME-type extensions specified in the mime-types.config file are
lowercase. Therefore, if you have a file with the extension .SHTML, this file appears as
text unless you add SHTML as an extension to the appropriate
MimeType directive or
Region command. See MimeType on page A-30.
Alternatively, if you are not concerned about the negative performance impact of having
all.html files parsed, you could use:
MimeType text/x-server-parsed-html html
This directive causes the server to parse all.html files searching for SSIs. Server parsing
also can be specified by CGI programs that return a
Content-type: text/x-server-parsed-html header.
SSI Directives
All SSI directives to the server are formatted as HTML comments. Each SSI directive
has the following format:
<!--#command [[tag1="value1" [tag2="value2"] ...] -->
where command is one of the following:
config
The config command controls various aspects of file parsing. This command
accepts three tags:
errmsg
controls which message is sent back to the web client if an error occurs while a
document is being parsed. When an error occurs, it is logged in the server’s
error and extended logs, in addition to being returned to the web client. For
example:
<!--#config errmsg="The server cannot satisfy request"-->
The default behavior of the server is to return error messages formatted as
SGML comments. If you use the configuration errmsg directive, the text of
errmsg is returned to the web client as is, it is returned within a comment only
if you specify it explicitly. For example:
errmsg="<!- -this is an error message -->"