Nginx enables gzip compression on a website, which not only saves bandwidth, but also responds to user access quickly. In nginx, the gzip compression method is www.2cto.com gzip on; (enable gzip compression) gzip_proxied any; (enable this option when nginx is used as a front-end proxy, indicating that compression is enabled unconditionally no matter what information is returned by the backend server's headers header) gzip_min_length 1024; (For the page with the minimum compression, if the page is too small, it may increase the pressure. compression is enabled only for pages larger than 1 k.) gzip_buffers 4 8 k; (set the system to obtain several units of cache for storing gzip compressed result data streams) gzip_comp_level 3; (compression level, 1 compression ratio, minimum processing speed, 9 compression ratio, but processing slowest, at the same time, it also consumes the most CPU resources. Generally, it can be set to 3.) gzip_types text/plain text/css application/x-javascript application/xml; after the configuration is complete, run the following command: www.2cto.com curl-I-H "Accept-Encoding: gzip, deflate "" http://yourhoust.com "HTTP/1.1 200 OKServer: nginx Date: Tue, 17 Jul 2012 07:08:04 GMTContent-Type: text/html; charset = utf-8Connection: keep-aliveCache-Control: privateX-AspNet-Version: 4.0.30319X-Powered-By: ASP. NETContent-Encoding: gzip author fairplay_li