Caching, purging & gzip

Simone fumagalli simone.fumagalli at
Tue Mar 15 17:18:38 MSK 2011

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 ( )

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 directives

Waiting for your hints 



More information about the nginx mailing list