Nginx feature request

Manlio Perillo manlio_perillo at libero.it
Sun Feb 10 20:05:29 MSK 2008


Hendrik Hardeman ha scritto:
> Hi all,
> 
> Discovered Nginx a few weeks back. After some experimenting I have come 
> to the conclusion that Nginx really is very very good.
> 
> I have a small feature request:
> 
> I have a set of static files (html and others) which I want to make 
> available only from a certain date/time. Inspired by the rewrite module, 
> this morning I thought of a simple method to control access to such files.
> 
> My idea was to set the file creation/modification time of the static 
> files in the future, i.e. the date/time from which they can be made 
> available (e.g. I could use the touch tool to set the appropriate 
> date/time). I could then do something like
> 
> if (!-f $request_filename) {return 404;}
> if ($date_gmt < fct($request_filename)) {return 403;}
> 
> Unfortunately, I haven't found a way to get at the file 
> creation/modification time (please do let me know if I overlooked 
> something). 

You can use the embedded Perl module.

 > [...]


Manlio Perillo





More information about the nginx mailing list