This approach was first used in HTTPD server (from NCSA), and then
incorporated into Apache. Now, it is a de facto standard and present
in many commercial Web servers. How it works?
- File need to have special extension. Usually .shtml
is used.
- Files with the .shtml are processed through
a filter which looks for HTML comments
<!-- #somekeyword... --> with a special syntax.
- The content of the special comment is replaced with dynamic content.
There are many SSIs. The popular SSIs are:
- <!--#include file="somefile" --> includes
a file at in place of the tag.
- <!--#set var="script_dir"
value="/usr/local/bin" --> sets an environment variable (so the next
call to a script can use it
- <!--#exec cgi="/cgi-bin/list_directory.pl"
--> executes a CGI script
- <!--#exec cmd="ps -ef | grep nobody"
--> executes a system commad (here it lists processes run by user
nobody
Detailed syntax of SSH is avaliable from Apache Web site:
http://httpd.apache.org/