Caching, purging & gzip

Hello everybody,

I currently have Nginx running as a reverse static proxy cache. I cache
CSS/JPG/JS file with proxy_cache directive. I’ve also cache purging with
ngx_cache_purge module ( http://labs.frickle.com/nginx_ngx_cache_purge/
)

Now I would like to serve my CSS/JPG/JS gzipped. What do you think is
the best way to achive this ?

  1. Modify apache conf to serve gzipped file to Nginx
  2. Configure NGINX to serve gzipped version with HttpGzipStaticModule

Please consider that :

  1. I still want my CSS/JPG/JS to be cached by nginx
  2. I still want be able to purge CSS/JPG/JS from the cache by using
    ngx_cache_purge module
  3. I don’t want to overload the reverse proxy machine with gzip
    operations so I was thinking about
    http://wiki.nginx.org/HttpGzipStaticModule#gzip_static directives

Waiting for your hints

Ciao


Simone

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs