ssi_silent_errors

The 'ssi_silent_errors' directive enables or disables the suppression of error messages generated by SSI commands in NGINX.

Syntaxssi_silent_errors on | off;
Defaultoff
Contexthttp, server, location
Argumentsflag

Description

The 'ssi_silent_errors' directive is part of the NGINX server configuration and is primarily used in conjunction with the Server-Side Includes (SSI) functionality. When this directive is set to 'on', any errors that occur during the processing of SSI directives will not be returned to the client as part of the response. Instead, NGINX will suppress these errors, allowing the server to continue delivering content without displaying any errors that might occur due to missing files, invalid directives, or other SSI-related errors. If 'ssi_silent_errors' is set to 'off', which is the default behavior, clients will receive standard error messages for these issues, which can be useful for debugging but may also expose internal server details to them.

For web applications that depend on SSI, using 'ssi_silent_errors' can improve the user experience by ensuring that non-fatal SSI errors do not disrupt content delivery. However, developers should note that while it hides errors from users, it may complicate troubleshooting, as server logs will contain the errors but clients will not see them. It’s important to balance error visibility for debugging with a clean user experience.

Config Example

location /includes/ {
    ssi on;
    ssi_silent_errors on;
    # Other configuration options
}

Setting 'ssi_silent_errors' to 'on' may lead to unnoticed issues in SSI processing that could affect content generation.

Remember to check server logs for errors instead of relying on client feedback when 'ssi_silent_errors' is enabled.

← Back to all directives