gzip is a file format and a software application used for file compression and decompression. On the web its used to compress contents before serving from server and is decompressed by client before use. This saves bandwidth and improves render time which in-turn brings happy faces.
On an apache server its straight forward using htaccess, Nginx isn’t a mammoth task normally involves uncommenting lines in configuration file. I had written about Compression of web pages a few years back explaining various methods to enable compression of different server.
Compression on Nginx
Open up the Nginx configuration file which is
/etc/nginx/nginx.conf. By default the the rules to enable Gzip are commented out with
# , you just have to uncomment those lines.
# Gzip Settings
gzip_buffers 16 8k;
gzip_types defines the type of files to be compressed.
This enables Gzip on all the sites you host on the server, you can over ride the settings on site configuration in