Nginx feature request

Manlio Perillo manlio_perillo at
Sun Feb 10 22:16:58 MSK 2008

Hendrik Hardeman ha scritto:
> Manlio,
> Thanks for the suggestion, but when I propose this feature, it's exactly 
> because I want to *avoid* something on top of Nginx (whether Perl, 
> Python, PHP or anything else) !

Well, you need scripting support, so I don't understand why you should 
avoid to use Perl.

nginx scripting module is very limited, and Igor has expressed 
intentions to improve it.

Maybe a better language to embed in nginx is LUA, but this is another 

> My need is very simple. All I want is to be able to disallow Nginx to 
> serve certain files based on filetime. This could be done in two ways:
> 1.
> A directive which is off by default but which can be switched on in any 
> of the standard places - most likely place would be in 'location'. Let 
> me tentatively name this directive 'filetime_check'. 

This should be easy to implement with a post access handler module, as 
an example.

> 2.
> Independent from the above, it might be useful to be able to access the 
> filetime of requested file for defining rewriting rules or for ssi. This 
> could either be through a variable or through a function:
> if ($date_gmt < fct($request_filename)) {do something, e.g. return 403;}

This too is easy to implement patching the rewrite module, but nginx 
will not be able to do the comparison (it only support boolean and regex 

Better to add a condition that will return true if the last modification 
time is in the future.

 > [...]

Manlio Perillo

More information about the nginx mailing list