Nginx Equivalent to LAST_MODIFIED variable in Apache SSI

marlowe at marlowe at
Wed Nov 19 20:55:33 MSK 2008

I am working on transitioning my web sites from Apache to Nginx.  In doing
so, I came across an issue.  Under Apache, I was able to include the
timestamp when a page was last modified through the use of the following

This document last modified <!--#echo var="LAST_MODIFIED" -->

When I made the conversion to Nginx, this statement returns the following

This document last modified (none)

This was expected as the SSI module documentation states the variable will
display "none" if no value is set.  Reading the documentation, it doesn't
appear there is a builtin variable which is the equivalent of Apache's
LAST_MODIFIED.  I did a google search to attempt to find a solution to
generate the timestamp into a new variable.  Unfortunately the only item I
found was this thread,

Can someone please point me in the proper direction to create an
equivalent to Apache's LAST_MODIFIED variable?


More information about the nginx mailing list