g-zip is a compression method. It generally reduces the size of transferred data by half.
How to enable it on the server?
Connect to the server via SSH and create the following file using nano or vi command:
etc/nginx/conf.dgzip.conf
Add the following lines to the content of this file you created and save it:
gzip on;
gzip_disable “MSIE [1-6].(?!.*SV1)”;
gzip_proxied any;
gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on;
Make sure nginx is running:
nginx -t
Restart your nginx service:
service nginx reload
Leave a Comment
* Your comment will be published after approval.
Comments
0No comments yet. Be the first to comment!