Seth Woolley's Man Viewer

ssi(8) - ssi - server-side-includes CGI program - man 8 ssi

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

ssi(8)                                                                  ssi(8)



NAME
       ssi - server-side-includes CGI program

SYNOPSIS
       ssi

DESCRIPTION
       This  is  an external CGI program that gives you the same functionality
       as the built-in server-side-includes feature in(1,8) some HTTP daemons.   It
       is written for use with thttpd(8), but should be easy to adapt to other
       systems.

       To use this program, first make sure it is installed in(1,8)  your  server's
       CGI area, and that CGI is enabled.  Then set(7,n,1 builtins) up your URLs with the path
       to the document you want parsed as the "pathinfo".  That's the part  of
       the URL that comes after the CGI program name.  For example, if(3,n) the URL
       to this program is:
         http://www.acme.com/cgi-bin/ssi
       and the url for your document is:
         http://www.acme.com/users(1,5)/wecoyote/doc.html
       then the compound URL that gives you the document filtered through  the
       program would be:
         http://www.acme.com/cgi-bin/ssi/users(1,5)/wecoyote/doc.html

       The      format      description      below     is     adapted     from
       http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html

INCLUDE FORMAT
       All directives are formatted as  SGML  comments  within  the  document.
       This  is  in(1,8)  case the document should ever find itself in(1,8) the client's
       hands unparsed.  Each directive has the following format:
         <!--#command tag1="value1" tag2="value2" -->
       Each command takes different arguments, most only accept(2,8) one tag  at  a
       time.  Here is a breakdown of the commands and their associated tags:

       *   config(1,5):  The  config(1,5) directive controls various aspects of the file(1,n)
           parsing.  There are two valid tags:

       o       timefmt: gives the server a new format to  use  when  providing
               dates.   This  is a string(3,n) compatible with the strftime library
               call.

       o       sizefmt: determines the formatting to be used  when  displaying
               the  size  of a file.  Valid choices are bytes, for a formatted
               byte count (formatted as 1,234,567), or abbrev for an  abbrevi-
               ated  version(1,3,5)  displaying  the number of kilobytes or megabytes
               the file(1,n) occupies.

       *   include: Inserts the text of another document into the parsed docu-
           ment.   The  inserted file(1,n) is parsed recursively, so it can contain
           server-side-include directives too.  This command accepts two tags:

       o       virtual(5,8): Gives a virtual(5,8) path to a document on the server.

       o       file(1,n):  Gives  a pathname relative to the current directory. ../
               cannot be used in(1,8) this pathname,  nor  can  absolute  paths  be
               used.

       *   echo(1,3x,1 builtins):  Prints  the  value  of one of the include variables (defined
           below).  Any dates are printed subject to the currently  configured
           timefmt.  The only valid tag to this command is var, whose value is
           the name of the variable you wish to echo.

       *   fsize: prints the size  of  the  specified  file(1,n),  subject  to  the
           sizefmt  parameter  to the config(1,5) command.  Valid tags are the same
           as with the include command.

       *   flastmod: prints the last modification date of the specified  file(1,n),
           subject to the formatting preference given by the timefmt parameter
           to config.  Valid tags are the same as with the include command.

VARIABLES
       A number of variables are made available to parsed documents.  In addi-
       tion  to  the CGI variable set(7,n,1 builtins), the following variables are made avail-
       able:

       *   DOCUMENT_NAME: The current filename.

       *   DOCUMENT_URI:  The  virtual(5,8)  path  to  this   document   (such   as
           /~robm/foo.shtml).

       *   QUERY_STRING_UNESCAPED:  The  unescaped version(1,3,5) of any search query
           the client sent.

       *   DATE_LOCAL: The current date, local  time(1,2,n)  zone.   Subject  to  the
           timefmt parameter to the config(1,5) command.

       *   DATE_GMT: Same as DATE_LOCAL but in(1,8) Greenwich mean time.

       *   LAST_MODIFIED:  The last modification date of the current document.
           Subject to timefmt like the others.

BUGS / DEFICIENCIES
       Does not implement the "exec(3,n,1 builtins)" directive.   Actually,  I  consider  this
       neither a bug nor a deficiency, but some may.

SEE ALSO
       thttpd(8), strftime(3)

AUTHOR
       Copyright  1995 by Jef Poskanzer <jef@acme.com>.  All rights reserved.



                                18 October 1995                         ssi(8)

References for this manual (incoming links)