Apache allows users to create documents which provide simple information to clients on the fly. Such information can include the current date, the file's last modification date, and the size or last modification of other files. In its more advanced usage, it can provide a powerful interface to CGI and /bin/sh programs.

SSI Issues

Having the server parse documents is a double edged sword. It can be costly for heavily loaded servers to perform parsing of files while sending them. Further, it can be considered a security risk to have average users executing commands as the server's user.

SSI Setup

HTML files are not parsed for SSI by default. To tag a file for SSI, rename it ending in .shtml instead of .html or set the 'x' bit on the file (chmod a+x filename). The x bit method is prefered.

The SSI Format

All directives to the server are formatted as SGML comments within the document. 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:

SSI Environment Variables

A number of variables are made available to parsed documents. In addition to the CGI variable set, the following variables are made available: