nginx as reverse proxy with "mod secdownload" feature - possible?

Sven 'Darkman' Michels sven at
Tue Oct 19 18:36:18 MSD 2010


currently i'm searching for some easy way to setup some kind of content cache.
nginx is one of my favorites for this, because it seems to be the most powerfull
and performant proxys out there.

The idea:

cache01 located in location abc
cache10 located in location xyz

main01 located in base DC
main04 located in base DC

The cacheXX servers should fetch the static content (pictures, videos) from one
of the main servers, store it locally and deliver it to the users. This seems to
be not a big deal so far. But we use mod_secdownload from lighttpd to protect the
content from beeing hotlinked or "guessed". If we now to an 1:1 caching, this
would work fine so far. But it also would require the cache to fetch one object
multiple times since the url will change. And this is something i would like to

So my idea was to setup some "internal" url on the mainserver without
mod_secdownload (access limited to the cache servers!), to have always the same
URL for one object. But then the cache has to do the protection of the content
instead of the main servers.

nginx has no feature like mod_secdownload so far, right? Is there anything i
could do to get nginx working as a proxy with something like mod_secdownload?
maybe some perl module or so? the important thing would just be to have every
picture/video only downloaded once, or at least once in xx days...

Thanks and regards,

More information about the nginx mailing list