2 messages in ru.sysoev.nginxRe: Nginx Equivalent to LAST_MODIFIED...
FromSent OnAttachments
marl...@antagonism.orgNov 19, 2008 9:55 am 
marloweDec 1, 2008 11:06 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Nginx Equivalent to LAST_MODIFIED variable in Apache SSIActions...
From:marlowe (marl@antagonism.org)
Date:Dec 1, 2008 11:06:44 pm
List:ru.sysoev.nginx

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

marl@antagonism.org wrote:

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 statement,

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,

http://article.gmane.org/gmane.comp.web.nginx.english/3336/match=last+modified+ssi

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

After doing some further research, found out LAST_MODIFIED is on the todo list according to a comment in the stable and development version of ngx_http_variable.c. My apologies for not checking the source code first. Is there a timeline/roadmap when this feature might be included?

iEYEARECAAYFAkk03psACgkQMYIXomaKpd9M6wCghEgET8cUqPI43kHAScDmdpUu gMYAnRT6qTx96Nnmq7l0WhrZIDS+brRG =QjBd -----END PGP SIGNATURE-----