My current setup is as following: Apache -> Nginx -> Varnish running on Ubuntu
apache2.conf: h**p://pastebin.com/A3wehAbe
.htaccess: h**p://pastebin.com/Yre4hdSy (edited to allow deflate)
nginx.conf: h**p://pastebin.com/6X59CTAr (gzip enabled)
varnish: default settings
My problem is, it seems that GZIP only works with html content, not css or js.
I tested GZIP with this tool at: http://www.gidnetwork.com/tools/gzip-test.php
h**p://rentsites.com.au result: compressed yes
status HTTP/1.1 200 OK server nginx/0.7.65 content-type text/html; charset=UTF-8 x-powered-by PHP/5.3.2-1ubuntu4.22 x-pingback h**p://rentsites.com.au/xmlrpc.php vary Accept-Encoding content-encoding gzip content-length 2281 accept-ranges bytes date Mon, 13 Jan 201400:50:26 GMT x-varnish 785049695 785049694 age 13 via 1.1 varnish connection close
h**p://rentsites.com.au/wp-includes/js/jquery/jquery.js result: compressed NO
status HTTP/1.1 200 OK server nginx/0.7.65 content-type application/x-javascript last-modified Wed, 21 Aug 2013 15:41:10 GMT expires Mon, 12 Jan 2015 23:17:22 GMT cache-control max-age=31536000, public pragma public content-length 93085 accept-ranges bytes date Mon, 13 Jan 2014 00:27:30 GMT x-varnish 785049693 785049631 age 4208 via 1.1 varnish connection close
h**p://rentsites.com.au/wp-content/themes/twentyfourteen/genericons/genericons.css result: compressed NO
status HTTP/1.1 200 OK server nginx/0.7.65 content-type text/css last-modified Tue, 12 Nov 2013 18:38:10 GMT expires Mon, 12 Jan 2015 23:16:50 GMT cache-control max-age=31536000, public pragma public content-length 22680 accept-ranges bytes date Mon, 13 Jan 2014 00:52:38 GMT x-varnish 785049696 785049621 age 5748 via 1.1 varnish connection close
Please help. Thanks for reading.
/etc/nginx/sites-enabled
is there a file other thandefault
? if not then please sharedefault
, because I don't think wordpress would work without special virtual host settings – Mohammad AbuShadyhttp
block of nginx.conf, so I think this might bevarnish
's fault, but I can't tell for sure if it supports gzip by default or not – Mohammad AbuShady