gzip+cache-dir: What's the easiest way to port this lighty config excerpt?
Sven C. Koehler
schween at snafu.de
Thu Sep 25 01:22:20 MSD 2008
Hi,
I am wondering what might be the easiest way to resemble the semantics of
lighttpd's compress.cache-dir:
| server.modules = ( "mod_compress" )
| compress.filetype = ("text/javascript", "text/css")
| server.document-root = "/web"
| $HTTP["url"] =~ "^/static/" {
| compress.cache-dir = "/web_cache"
| }
What it does is to automatically generate gzipped representations of
files below /web/static/ (according to their last-modified time) in the
directory /web_cache. I find this very handy and it greatly reduces the
load for serving compressed files which change rarely.
On nginx, however, I cannot see how I could resemble this semantic with
only "gzip on" or "gzip_static on"--is that correct?
Best,
Sven
More information about the nginx
mailing list