We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
[HowTo] enable GZIP compression on VestaCP Server running Apache
[HowTo] enable GZIP compression on VestaCP Server running Apache
GZIP compression is bundling (zipping) pages on a web server before the page is sent to the visitor.
This saves bandwidth and therefore increases the loading speed of the page significantly.
The visitors’ web browser then automatically unzips the pages. This compressing and unzipping only takes a fraction of a second.
GZIP compression is recommended for all types of text files such as:
GZIP compression saves 50% to 80% bandwidth and will therefore significantly increase the website’s loading speed.
The textfiles are compressed (zipped) on the web server after which the visitor’s web browser will automatically unzip the files. This compressing and unzipping only takes a fraction of a second without the end user noticing.
To enable GZIP compression you only need to enable “Apache Module mod_deflate” you can search how to enable it on your distro.
How to enabled GZIP :
I assume you already activate mod_deflate module under Apache now you just need to put this line in .htaccess :
Congratulation you just enabled GZIP compression on your site.
How to check gzip is working or not?
A. Visit this site https://www.giftofspeed.com/gzip-test/ , enter your site url then hit the check button.
This saves bandwidth and therefore increases the loading speed of the page significantly.
The visitors’ web browser then automatically unzips the pages. This compressing and unzipping only takes a fraction of a second.
GZIP compression is recommended for all types of text files such as:
- HTML (.html) but also all types of dynamic HTML (such as extension .php, .aspx)
- Textfiles (extension .txt)
- CSS and Javascript (extension .css and .js)
- Webservices, such as WSDL, REST and JSON
GZIP compression saves 50% to 80% bandwidth and will therefore significantly increase the website’s loading speed.
The textfiles are compressed (zipped) on the web server after which the visitor’s web browser will automatically unzip the files. This compressing and unzipping only takes a fraction of a second without the end user noticing.
To enable GZIP compression you only need to enable “Apache Module mod_deflate” you can search how to enable it on your distro.
How to enabled GZIP :
I assume you already activate mod_deflate module under Apache now you just need to put this line in .htaccess :
Code: Select all
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>
How to check gzip is working or not?
A. Visit this site https://www.giftofspeed.com/gzip-test/ , enter your site url then hit the check button.