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:Matthew Wensing (mwen@public.gmane.org)
Date:Jan 30, 2008 5:26:58 am
List:ru.sysoev.nginx

By the way, the backyardpost.css file header looks like this (I see the ‘gzip’ in the Content-Encoding):

HTTP/1.1 200 OK Server: nginx/0.6.16 Date: Wed, 30 Jan 2008 12:27:17 GMT Content-Type: text/css Transfer-Encoding: chunked Connection: keep-alive Keep-Alive: timeout=20 Last-Modified: Fri, 25 Jan 2008 03:07:01 GMT Vary: Cookie Set-Cookie: uid=QwqV0UegbSUAABS2AwMGAg==; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/ Content-Encoding: gzip

Thanks again,

Matt

On 1/30/08 12:00 AM, "moda"
<jiao@public.gmane.org> wrote:

do this: curl -S -I -H "Accept-Encoding:gzip" http://dev.foo.com/site_media/js/backyardpost.js

HTTP/1.1 200 OK Server: nginx/0.5.34 Date: Wed, 30 Jan 2008 04:49:43 GMT Content-Type: application/x-javascript Last-Modified: Sat, 29 Dec 2007 04:01:49 GMT Transfer-Encoding: chunked Connection: keep-alive Expires: Wed, 30 Jan 2008 05:19:43 GMT Cache-Control: max-age=1800 Content-Encoding: gzip

在08-1-30,Matthew Wensing <mwensing-aGbF+Ee2sZXQT0dZR+Al@public.gmane.org> 写道:

I do have that in the list. Are you saying to only have that one, or as a separate directive, or what?

On 1/29/08 8:51 PM, "焦胜强" <jiaosq-bj+XDJj@public.gmane.org>
wrote:

gzip_types application/x-javascript

2008/1/30, Matthew Wensing <mwensing-aGbF+Ee2sZXQT0dZR+Al@public.gmane.org>:

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" <elio@public.gmane.org>
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 <mwensing-aGbF+Ee2sZXQT0dZR+Al@public.gmane.org>
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 <http://dev.foo.com> <http://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 <http://127.0.0.1:8080>

<http://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