Enable gzip configuration in nginx web server on VPS
To change the Nginx
gzip
configuration, open the main Nginx configuration file in nano
or your favorite text editor.
- sudo nano /etc/nginx/nginx.conf
Find the
gzip
settings section, which looks like this:##
# `gzip` Settings
#
#
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
..
Save and close the file to exit.To enable the new configuration, restart Nginx.
- sudo service nginx restart
Comments
Post a Comment