Enabling gzip compression

Puntocom

Well-known member
Please, can you help me enabling gzip compression? I'm using nginx 1.7.10 with PHP 5.6.10 and I can't make it work for some files.

From GTMetrix:
Code:
Compressing the following resources with gzip could reduce their transfer size by 172.1KiB (67% reduction).
Compressing https://example.com/js/xenforo/xenforo.js?_v=c6cba854 could save 110.6KiB (68% reduction).
Compressing https://example.com/js/jquery/jquery-1.11.0.min.js could save 61.5KiB (65% reduction).
Code in nginx.conf:
Code:
  gzip on;
  #gzip_disable "msie6";
  #gzip_vary on;
  # gzip_proxied expired no-cache no-store private auth;
  gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
php.ini:
Code:
lib.output_compression = On
 
Are you using the spdy module for nginx? And this might sound retarded, but did you reload the service after you did the conf changes?
 
I'm not using SPDY. It's a pretty default config, only the mininum needed to work. Yes, I restarted it several times.
 
Back
Top Bottom