$ nginx -V
$ sudo vim /etc/nginx/nginx.conf
gzip on;
gzip_buffers 4 16k;
gzip_min_length 1k;
gzip_comp_level 6;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
$ sudo truncate -s 1k /var/www/html/test.html
$ sudo truncate -s 1k /var/www/html/test.jpg
$ sudo truncate -s 1k /var/www/html/test.css
$ sudo truncate -s 1k /var/www/html/test.js
$ curl -H "Accept-Encoding: gzip" -I http://localhost/test.html
$ curl -H "Accept-Encoding: gzip" -I http://localhost/test.jpg
$ curl -H "Accept-Encoding: gzip" -I http://localhost/test.css