Ispmanager 6 business documentation

Enable compression

 

In ISPmanager you can configure compression of a website static content which includes files that can be easily modified (images, music, video, etc.). As a rule, such files consume much space and slow down your website. To compress them open the WWW-domain edit form and enable the option Compression and set a Compression level.  Learn more under the article Add a WWW-domain. The maximum compression level is  9. The minimum is 1. We recommend setting 5.

The ngx_http_gzip_module module is a filter that compresses a request with gzip, enabling to reduce data size. If the compression is enabled, the following information is added into the Nginx configuration file for the WWW-domain: 

Nginx configuration file

gzip on;
gzip_comp_level <compression level>;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript
Details

Perform the following steps to modify a list of data types:

  1. Add the following variable on every cluster node in the ISPmanager configuration file /usr/local/mgr5/etc/ispmgrnode.conf 

    ISPmanager configuration file

    path nginx-gzip-types <data type>
    E.g.:

    ISPmanager configuration file

    path nginx-gzip-types text/plain text/css
  2. Restart the control panel
    /usr/local/mgr5/sbin/mgrctl -m ispmgr exit
  3. To apply the changes to the existing WWW-domains go to  Domains → WWW-domains → Edit and click Ok.

For more information about ngx_http_gzip_module please refer to the official website.