nginx中,启动SSI后,ssi_silent_errors参数为什么不起作用?
在nginx上配置SSI
需要的选项主要是以下三个:
ssi: 默认值off,启用ssi时将其设为on
ssi_silent_errors: 默认值off,开启后在处理SSI文件出错时不输出错误提示"[an error occurred while processing the directive]"。
ssi_types: 默认是text/html
我启动了ssi,html页面中,以下方式引入了:<!--#include file="/aa.html" -->
aa.html文件并不存在,我期望出现[an error occurred while processing the directive],但是却出现了404 Not Found,无论ssi_silent_errors值是什么,都显示404 Not Found
我的目标是希望当ssi引入的资源出现404、500、503、504等错误时,不显示任何错误提示,空白即可,不影响静态html的显示,但是当非ssi方式正常访问链接时,如有404、50x等错误则正常显示错误页面。请问如何实现呢?