Server-side includes trigger further actions whose output, if any, may then be placed inline into served documents or affect subsequent includes. The same results could be achieved by CGI scripts — either shell scripts or specially written C programs — but server-side includes often achieve these results with a lot less effort. There are, however, some security problems. The range of possible actions is immense, so we will just give basic illustrations of each command in a number of text files in ...site.ssi/htdocs.
The Config file, .../conf/httpd1.conf, is as follows:
User webuser Group webgroup ServerName www.butterthlies.com DocumentRoot /usr/www/APACHE3/site.ssi/htdocs ScriptAlias /cgi-bin /usr/www/APACHE3/cgi-bin AddHandler server-parsed shtml Options +Includes
Run it by executing ./go 1.
Options Includes turns on processing of SSIs. As usual, look in the error_log if things don't work. The error messages passed to the client are necessarily uninformative since they are probably being read three continents away, where nothing useful can be done about them.
<!--#element attribute="value" attribute="value" ... -->
The Apache manual tells us what the elements are:
An attribute defines the location of the document; the inclusion is done for each attribute given to the include command. The valid attributes are as follows:
Copyright © 2003 O'Reilly & Associates. All rights reserved.