Nginxgzip configuration details

Source: Internet
Author: User
The Nginxgzip configuration details gzip determine whether to enable the gzip module param: on | offexample: gzipon; gzip_buffers to set the size of the memory requested by gzip. the function is to apply for the memory space param1: intparam2: the unit behind int (k) is kexample: gzip_buff... for details about Nginx gzip configuration, gzip determines whether to enable the gzip module param: on | offexample: gzip on; gzip_buffers sets the size of the memory requested by gzip. Its role is to apply for the memory space param1 by a multiple of the block size: intparam2: int (k) is followed by kexample: gzip_buffers 4 8 k. gzip_comp_level sets the gzip compression level. The lower the level, the faster the compression speed, the smaller the file compression ratio, on the contrary, files with slower speed have a higher compression ratio. param: 1-9example: gzip_com_level 1; gzip_min_length uses gzip for compression only when the returned content is greater than this value. The unit is K and the value is 0, all pages are compressed. param: intexample: gzip_min_length 1000; gzip_http_version is used to identify the http protocol version. earlier browsers do not support gzip compression and users will see garbled text, this option is added to support earlier versions. Currently, this option can be used to ignore param: 1.0 | 1.1 example: gzip_http_version 1.0 gzip_proxiedNginx when used as a reverse proxy. param: off | expired | no-cache | no-sotre | private | no_last_modified | no_etag | auth | any] expample: gzip_proxied no-cache; off-disable all proxy result data compression expired-enable compression. if The header contains "Expires" header information no-cache-enable compression, if the header contains "Cache-Control: no-cache header information no-store-enable compression. if The header contains the "Cache-Control: no-store" header information private-enable compression, if the header contains the "Cache-Control: private" header information no_last_modified-enable compression, if the header contains the "Last_Modified" header information no_etag-enable compression, if the header contains the "ETag" header information auth-enable compression, if the header contains the "Authorization" header information any-unconditionally compress all result data gzip_types to set the MIME type to be compressed, unset values do not compress param: text/html | application/x-javascript | text/css | application/xmlexample: gzip_types text/html; Demo gzip on; gzip_min_length 1000; gzip_buffers 4 8 k; gzip_types text/html application/x-javascript text/css application/xml;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.