August 2017
Intermediate to advanced
278 pages
8h 53m
English
In order to enable gzip within NGINX, we need to enable the gzip module and explicitly tell it what files to compress. The easiest way to do this server-wide is to create a gzip.conf file within the /etc/nginx/conf.d directory directly, alongside your server directive files. This could also be set per site or even per location if required; the gzip directives can be nested within an existing block directive.
Here's what is required:
gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_proxied any; gzip_types text/plain text/css application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml; gzip_vary on;
If you want to measure how much difference ...
Read now
Unlock full access