Nginx and gzip compression


#1

Hello,

I recently moved my sites to nginx and wiki page claims gzip compression is on by default.

Unfortunately it is not working for none of my sites:
http://www.medicineinanswers.com
http://www.financeinanswers.com

I tried adding these lines to .conf file:

gzip on;
gzip_min_length 1000;
gzip_http_version 1.1;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth any;
gzip_comp_level 9;
gzip_types text/html text/css text/plain text/xml application/xml application/xml+rss text/javascript application/x-javascript;
gzip_vary on;
gzip_disable “msie6”;

but no luck either.

What am I missing? Any help will be appreciated.


#2

Neither of the domains you linked exists, and I don’t see anything that even looks like them on your account. What gives?


#3

Hello, sorry in the hurry I made a typo, the correct addresses are:
http://www.medicineinanswers.com
http://www.financeinanswers.com

Sorry again


#4

As far as I can tell, it is working. I just requested the main page of medicineinanswers.com and got a response with the headers:

HTTP/1.1 200 OK Server: nginx/0.8.53 Date: Tue, 09 Oct 2012 18:11:04 GMT Content-Type: text/html Last-Modified: Tue, 09 Oct 2012 16:51:46 GMT Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Content-Encoding: gzip


#5

Hello, yes I worked that out with DH support. The problem was wrong settings in DH wiki http://wiki.dreamhost.com/Nginx#WordPress
for SuperCache and it is still unchanged now.

The line:

should be:

I hope someone else finds it useful and DH support will fix that on wiki page. Thanks for all the help!


#6

I would like to resurrect this thread for 1 more issue.

Although the main page is gzipped now, still when I try to access .css or .js file that content is not gzipped. Does anybody know how to turn gzipping for .js and .css files?

curl -I http://www.medicineinanswers.com/wp-content/themes/maverick/css/nivo.css

Thanks!


#7

If you’re using WP Super Cache, it’s because that plugin does not compress your js/css.

You would need to use another plugin for that (like Minify)