# Nginx Equivalent to LAST\_MODIFIED variable in Apache SSI

**URL:** <https://www.ruby-forum.com/t/nginx-equivalent-to-last-modified-variable-in-apache-ssi/153643>\
**Category:** NGINX\
**Created:** [November 19, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/nginx-equivalent-to-last-modified-variable-in-apache-ssi/153643 "2008-11-19T19:05:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 19, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/nginx-equivalent-to-last-modified-variable-in-apache-ssi/153643/1 "2008-11-19T19:05:00Z")

</div>

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

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](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?

Thanks,  
Patrick

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 2, 2008, 8:16am UTC](https://www.ruby-forum.com/t/nginx-equivalent-to-last-modified-variable-in-apache-ssi/153643/2 "2008-12-02T08:16:20Z")

</div>

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

removed\_email\_address@domain.invalid wrote:

> equivalent to Apache’s LAST\_MODIFIED variable?
> 
> Thanks,  
> Patrick

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?

Thanks,  
Patrick  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.9 (MingW32)  
Comment: email removed\_email\_address@domain.invalid for my GPG public key  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

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