How to enable ngx_http_gzip_module module


2016-11-16 12:55:04 UTC


2017-08-16 16:07:29 UTC


Помогла ли вам статья?

Есть вопросы?

Отправить запрос

How to enable ngx_http_gzip_module module

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux


ngx_http_gzip_module module is a filter that compresses responses using the gzip method. This often helps to reduce the size of transmitted data by half or even more.

How to enable it?


  1. Create a file using the command ' vi /etc/nginx/conf.d/gzip.conf ' and put the following content in it:

    gzip         on;
    gzip_disable "MSIE [1-6]\\.(?!.*SV1)";
    gzip_proxied any;
    gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
    gzip_vary on;

    This is an example. It is possible to add in gz_types - application/javascript , application/js , etc.

  2. тест 123 (if any):

    # nginx -t
  3. Reload nginx configuration:

    # service nginx reload

Other gzip_types available for compression can be obtained from /etc/nginx/mime.types .

More about gzip compression module can be found in nginx manual .

Была ли эта статья полезной?
Пользователи, считающие этот материал полезным: 33 из 63
Еще есть вопросы? Отправить запрос
Войдите в службу, чтобы оставить комментарий.