Gzip just fails

Hey, I’ve tried kind of everything but it seems like nginx just won’t
gzip.

I have this in http zone, no page is gziped, only php ones but that’s
php’s internal compression.
I also receive Transfer-Encoding chunked from server.

Any ideas? this is nginx-0.8.28

 include       /etc/mime.types;
 default_type  application/octet-stream;
 access_log off;
 sendfile     on;
 gzip              on;
 gzip_proxied      any;
 gzip_comp_level   5;
 gzip_types        text/plain text/css application/x-javascript 

text/xml application/xml;
gzip_http_version 1.1;
gzip_disable “MSIE [1-6].”;
server_names_hash_bucket_size 128;
autoindex on;
error_page 404 /btnerror/404.html;
log_not_found off;
server_tokens off;
client_max_body_size 32m;

Paul Roland wrote:

Hey, I’ve tried kind of everything
but it seems like nginx just won’t gzip.

Any ideas?

check error.log or debug error.log if not clear up

 default_type      application/octet-stream;
 gzip_types        text/plain text/css application/x-javascript text/xml application/xml;
 gzip_disable     "MSIE [1-6]\.";


Best regards,
Gena

Start with a basic gzip config:

gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript;

Check that nginx is now gzipping. Then add things like gzip_http_version
and gzip_disable (doing an nginx reload each time) and see which one
causes nginx to stop gzipping.

Mark.

I have both error_log /opt/btnws2/logs/debug.log debug; and access_log
/opt/btnws2/logs/debug2.log; enabled, no error is shown and no debug is
made.

switching back to stable makes gzip work with the exact same
configuration so that is clearly an nginx issue.

switching back to stable makes gzip work with the exact same configuration
so that is clearly an nginx issue.

… or a build issue.

  • Jeff


linux.conf.au 2010: Wellington, NZ
http://www.lca2010.org.nz/

                      I am Jack's smoking gun.

Paul Roland wrote:

I have both error_log /opt/btnws2/logs/debug.log debug;
and access_log /opt/btnws2/logs/debug2.log; enabled,
no error is shown and no debug is made.

./configure --with-debug needed:
$ ./configure --help | grep debug
–with-debug enable the debugging logging


Best regards,
Gena

nope, both were build the same.

./configure --prefix=/opt/btnws2 --with-http_stub_status_module
–with-http_gzip_static_module --conf-path=/opt/btnws2/server.conf

this is my configure line

Configuration summary

  • using system PCRE library
  • OpenSSL library is not used
  • md5: using system crypto library
  • sha1 library is not used
  • using system zlib library