gzip not working for some files using nginx
Posted
by
shakalandy
on Server Fault
See other posts from Server Fault
or by shakalandy
Published on 2012-09-16T09:57:04Z
Indexed on
2012/09/17
3:40 UTC
Read the original article
Hit count: 586
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.
© Server Fault or respective owner