In the current release of VestaCP, it supports gzip which is compliled into NGINX. However the gzip_types aren’t quite 100%. To gain the best possible compression for NGINX you will need to simply add the following gzip types below.
1. nano /etc/nginx/nginx.conf
2. Locate the part that starts with gzip_types
it usually sits within the compression tag.
4. Replace the gzip_types entry with the following:
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;
5. Save/exit nano then restart nginx.
service nginx restart
You can test that gzip is working by going to Pingdom and testing the speed in which your site loads at and reviewing the breakdown. Its often best to do a before and after as you have something to compare it against.
Be the first to comment on "VestaCP – GZip Compression"