Mastering Nginx

(Ron) #1
Chapter 7

[ 173 ]

The Server Side Includes commands supported by NGINX are shown in the


following table. They all follow the following pattern:


<!--# command parameter1=value1 parameter2=value2 ... -->

Table: Server Side Includes commands

Command Argument Explanation
block Defines a section that can be
referenced in the include
command. Ends with <!--#
endblock -->.
name Name of the block.
config Sets global parameters used
during SSI processing.
errmsg Configures the string used as the
error message if something goes
wrong during SSI processing.
The default is [an error
occurred while processing
the directive].
timefmt A string passed to strftime()
to format a timestamp used in
other commands. The default is
%A, %d-%b-%Y %H:%M:%S %Z.
echo Writes out the value of a variable.
var The name of the variable whose
value is written out.
encoding The encoding method used for
the variable. The value it can take
is one of none, url, and entity.
The default is entity.
default A value to write out if the
variable is undefined. If unset,
none is the default.
if Evaluates a condition. If true, the
block enclosed will be included.
The sequence if, elsif, else,
and endif is supported one level
deep.
Free download pdf