Skip to content

Instantly share code, notes, and snippets.

@flusher
Created May 2, 2014 16:15
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flusher/a85dc64bc8488446a98b to your computer and use it in GitHub Desktop.
Save flusher/a85dc64bc8488446a98b to your computer and use it in GitHub Desktop.
Apache Benchmark test load with gzip compression
ab -c 10 -n 1000 -H "Accept-Encoding: gzip,deflate" http://www.example.com/
@jougene
Copy link

jougene commented Nov 18, 2022

It is not working if nginx does not have option - gzip_http_version 1.0;

@cantoute
Copy link

cantoute commented Nov 21, 2022

I use these settings on nginx and haven't had to specify gzip_http_version

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";

# when proxy if backend returned a gzip encoded for a client that would not support it
# makes sense if we want varnish to store compressed content
gunzip on;

# add the vary accept header
gzip_vary on;
gzip_proxied any;
gzip_comp_level 7;
gzip_buffers 16 8k;
gzip_types text/plain text/css application/json text/xml application/xml application/xml+rss text/javascript application/javascript application/x-javascript;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment