from the documentation :
The ngx_http_ssi_module module is a filter that handles server side inclusions (SSI) commands in the responses that pass through it.
ssi support ( server side includes ) you have already included above. the response from the backend will be returned - nginx will pass it through the filter before returning “upward”.
if you need a backend to notify that nginx will process ssi commands - notify. Give one variable, for example. the main thing is for the backend to understand this.
and to distinguish include virtual, you can add the necessary parameter to the url . eg:
<!--#include virtual="header.php?ssi=on"-->