When ever it's about the web hosting then the most important thing which comes into mind is “speed”. mod_deflate GZIP Compression on cPanel is used to speed up the website. This technique compresses the file on the website and this will definitely speed up the website too. You can enable mod_deflate GZIP Compression from the cPanel but the first thing you must do is to enable the mod_deflate module on Apache.
mod_deflate module on Apache can be enabled by two methods.
First Method :
Enable mod_deflate via easyapache.
Rebuild your apache by executing the command
# /scripts/easyapache
Before executing easyapache take a backup of both Apache and Php conf file and also note current version of your apache and php. Command to find the php configuration file.
# php --ini
Command to find Apache and php version.
# httpd -v (Apache)
# php -v (PHP)
Now execute the easyapache
Second Method (Server without cPanel) :
Enable mod_deflate by editing apache conf(httpd.conf) file.
Add these lines to configure mod_deflate in your apache configuration file.
<IfModule mod_deflate.c>
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE image/x-icon
</IfModule>
If you want to compress only a few types, you can add the following line to the apache conf.
AddOutputFilterByType DEFLATE text/html text/plain text/xml
Restart apache service to complete the process by
# /etc/init.d/httpd restart
Or
# service httpd restart
Check modules in httpd By
# httpd -M
Check httpd conf syntax By
# httpd -t
Now you can enable mod_deflate GZIP Compression on cPanel By These Easy Steps.
Step 1 : Log In To cPanel Account By
http://yourdomain.com/cpanel
Or
http://yourdomain.com:2082 / 2083(SSL)
Step 2 : In the Software/Services Section find the Optimize Website option.
Step 3 : Now Disable or Enable the Compression of the content available on your website.
Final Step : Click On “Update Setting” Button.
mod_deflate module on Apache can be enabled by two methods.
First Method :
Enable mod_deflate via easyapache.
Rebuild your apache by executing the command
# /scripts/easyapache
Before executing easyapache take a backup of both Apache and Php conf file and also note current version of your apache and php. Command to find the php configuration file.
# php --ini
Command to find Apache and php version.
# httpd -v (Apache)
# php -v (PHP)
Now execute the easyapache
Second Method (Server without cPanel) :
Enable mod_deflate by editing apache conf(httpd.conf) file.
Add these lines to configure mod_deflate in your apache configuration file.
<IfModule mod_deflate.c>
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE image/x-icon
</IfModule>
If you want to compress only a few types, you can add the following line to the apache conf.
AddOutputFilterByType DEFLATE text/html text/plain text/xml
Restart apache service to complete the process by
# /etc/init.d/httpd restart
Or
# service httpd restart
Check modules in httpd By
# httpd -M
Check httpd conf syntax By
# httpd -t
Now you can enable mod_deflate GZIP Compression on cPanel By These Easy Steps.
Step 1 : Log In To cPanel Account By
http://yourdomain.com/cpanel
Or
http://yourdomain.com:2082 / 2083(SSL)
Step 2 : In the Software/Services Section find the Optimize Website option.
Step 3 : Now Disable or Enable the Compression of the content available on your website.
Final Step : Click On “Update Setting” Button.