I have NGINX SSI working fine in the virtualHosts file (code below) but `LAST_MODIFIED` is returning "(none)", although the [NGINX docs for SSI][1] state that the `ssi_last_modified` directive appeared in version 1.5.1 (we’re running version 1.14.2).
VirtualHost file:
``` location / {
ssi on;
ssi_last_modified on;
try_files $uri $uri/ =404;
}
…
```
and in the .html file:
```html
<!--#if expr="$footer_id='blackfooter'" --><div id="blackfooter"><!--#else --><div id="footer"><!--#endif -->
<!--#config timefmt="%A %d %B %Y" --><p>Updated: <!--#echo var="LAST_MODIFIED" --> | Today: <!--#echo var="DATE_LOCAL" --></p>
</div>
```
So for now, I've resorted to JavaScript:
```html
<!--#if expr="$footer_id='blackfooter'" --><footer id="blackfooter"><!--#else --><footer><!--#endif -->
<!--#config timefmt="%A %d %B %Y" --><p>Updated: <span id="updated"></span> | Today: <!--#echo var="DATE_LOCAL" --></p>
</footer>
<script>
let lastmod = new Date(document.lastModified);
updated.innerHTML = lastmod.toString().substring(4,15);
</script>
```
Why is **NGINX delivering other documented SSI functionality**, but **not `LAST_MODIFIED`** in the header?
The only possible clue I found was that the `sub_filter_last_modified` is mentioned in the [docs for the NGINX ngx_http_sub_module][2] but AFAIK (and I'm not NGINX specialist) I'm not sure that helps much.
[1]: https://nginx.org/en/docs/http/ngx_http_ssi_module.html#ssi_last_modified
[2]: https://nginx.org/en/docs/http/ngx_http_sub_module.html