Using Server Side Includes

The ssi module is also a filter, and one of NGINX's most flexible. It enables the use of Server Side Includes (SSI) for processing logic embedded in a webpage. It supports a series of commands that are controlled by the following directives:

SSI directives

Explanation

ssi

This directive enables the processing of SSI files.

ssi_silent_errors

This directive suppresses the error message normally output when an error occurs during SSI processing.

ssi_types

This directive lists the MIME types of a response in addition to text/html in which the SSI commands are processed. It may be * to enable all MIME types.

The SSI commands and arguments supported by NGINX are shown in the following table:

The SSI commands

Get Mastering NGINX - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.