In the modern era of dynamic content management systems (CMS) like WordPress, React, and Angular, a quiet but powerful technology still runs millions of legacy and high-efficiency websites: SHTML (Server Side Includes HTML) . For developers who need to serve lightweight, fast-loading pages without the overhead of a database, SHTML is a secret weapon.
Options +Includes XBitHack on AddType text/html .shtml AddHandler server-parsed .shtml SSILogLevel debug SSILog ssi_log view shtml extra quality
location ~ \.shtml$ ssi on; ssi_types text/html; subs_filter '<!--#include virtual="(.*)" ?>' 'INCLUDED: $1' ir; In the modern era of dynamic content management
Then use an SSI directive to echo parsed content: Even with the methods above, you may not
This replaces the SSI directive with a visible marker, allowing you to verify if includes are being resolved. Even with the methods above, you may not get "extra quality" results. Here are the top three failure modes:
<!--#config errmsg="[Error: Include Failed]" --> <pre> <!--#include virtual="/debug/ssi_status.html" --> </pre> Nginx doesn’t parse SHTML natively like Apache. Instead, use ngx_http_subs_filter_module to view interpolated variables: