gzip not working for some files using nginx
- by shakalandy
Some files are not gzipped on their way to the user browser in our setup.
for example
http://myhostname.com/css/build/20120904-1.css
http://myhostname.com/js/dojo/dn/main.js?20120904-1
http://myhostname.com/js/jquery-min/compiled.js?20120725-4
can not be zipped.
my current configuration:
location ~* \.(js|css|png|jpg|jpeg|gif|ico)\.*+$ {
if ($args ~ [0-9]\.*+) {
expires max;
break;
}
expires max;
log_not_found off;
gzip on;
}
What needs to be adjusted to make gzip fly?
I already tried several other options but don't want to continue with try&error on this.
Thank you very much.