9 messages in ru.sysoev.nginxRe: Gzip troubles
FromSent OnAttachments
Matthew WensingJan 29, 2008 1:25 pm 
eliottJan 29, 2008 1:31 pm 
Matthew WensingJan 29, 2008 1:41 pm 
焦胜强Jan 29, 2008 5:50 pm 
Matthew WensingJan 29, 2008 8:27 pm 
modaJan 29, 2008 9:00 pm 
Matthew WensingJan 30, 2008 5:25 am 
Matthew WensingJan 30, 2008 5:26 am 
Matthew WensingJan 30, 2008 5:31 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Gzip troublesActions...
From:焦胜强 (jiao@public.gmane.org)
Date:Jan 29, 2008 5:50:50 pm
List:ru.sysoev.nginx

gzip_types application/x-javascript

2008/1/30, Matthew Wensing <mwen@pbpost.com>:

Not sure why you are trying to compress png and pdf files on the fly.

'Cause I'm a beginner. :) Thanks!

Matt

On 1/29/08 4:32 PM, "eliott" <eli@cactuswax.net> wrote:

Look at the http headers during a request. It is probably being compressed (the js files).

Not sure why you are trying to compress png and pdf files on the fly.

On 1/29/08, Matthew Wensing <mwen@pbpost.com> wrote:

I'm having a difficult time getting files (.js, .png) to gzip under my configuration. Can someone tell me if I'm doing something wrong?

# Django project server { listen 80; server_name dev.foo.com;

location ^~ /media { root /usr/local/backyardpost/trunk/static/admin; access_log on; access_log /var/log/nginx/static_media.log download; }

location ~*

^.+\.(mpg|avi|mp3|swf|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|txt|tar|mid|midi|wav

|rtf|mpeg)$ { limit_rate 2000K; access_log /var/log/nginx/django_media.log download; access_log on; }

location / { fastcgi_pass 127.0.0.1:8080; include bots.conf; include fastcgi.conf; access_log /var/log/nginx/django.log main; }

# output compression saves bandwidth gzip on; gzip_http_version 1.0; gzip_min_length 1100; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/html text/css text/xml application/x-javascript application/pdf application/xml application/xml+rss text/javascript;

}

Seems like some things (HTML) are being gzipped by nginx automatically, but I have a JavaScript file being served at: http://dev.foo.com/site_media/js/backyardpost.js that isn't being gzipped. The file is 6.7K, so it doesn't make sense to me. I have a CSS file at http://dev.foo.com/site_media/css/backyardpost.css that supposedly is being gzipped (it is 6.3K).

Any idea what's going on?

Also, I am using Yahoo!'s Yslow plugin for Firefox to detect what components are being gzipped. Should I be looking at something else instead?

Thanks,

Matthew