Apache Gzip module configuration

zhaozj2021-02-16  47

This article is written when I work in 2002 or when Gzip Win32 Port works. Post comes to help everyone.

Teaching] How to configure the gzip module of Apache. 〖First, thank you e-day translation Gzip Module configuration manual. 〗 This guide will show you how to configure Apache Gzip Module, and how to configure it according to your needs. For best performance. Gzip Module is free software, which is completely free. Using this module you need the support of the Zlib library, you can find it at www.zlib.org. Similarly, ZLIB is also free software. The role of Gzip Module is to compress data passed by the server to the client. You can define what kind of file is compressed, and the memory space size occupied by Gzip Module. For Windows users, you can download a dynamic link library that has been compiled and used directly. Of course, you can also download the source code using the VC 5.0 / 6.0 version. Configuring Gzip_MOD guidance in Apache: Note: This configuration guide is only available in three versions of 1.3.19.1A, 2.0.26A, 2.0.30. The remaining versions do not guarantee that the information described in this guide can work properly. 1 Add MOD_GZIP information in the Apache log. MOD_GZIP Use Apache's "Notes" feature to allow you to add information to Apache's Access.log file. The following specific 'logformat' only shows a compression ratio. If a file is not compressed, the crossbar "-" or 0 "zero" ... logformat "% h% L% U% T /"% r / "%> s% B mod_gzip:% {mod_gzip_compression_ratio} NPCT is displayed. "Common_With_MOD_GZIP_INFO1 The following specific 'logFormat' will display all information of the compressed file. Similarly, if a file is not compressed, the crossbar "-" or 0 "zero" ... logformat "% H% L% u% T /"% r / "%> S% B mod_gzip:% {mod_gzip_result} n in:% {mod_gzip_input_size} n Out:% {mod_gzip_output_size} n:.% {mod_gzip_compression_ratio} npct "common_with_mod_gzip_info2 order to make custom 'LogFormat' force, you need to use the Apache 'CustomLog' command, consider the following example command Apache ... CustomLog logs / access.log common_with_mod_gzip_info2 h prompt: This command adds our second log format we just customize to the Access.log file. Note: If you use more than more than one 'CustomLog' command, you will get multiple records in each customer request. Unless you have determined to do this, please only keep one 'CustomLog' command work. Please read the Apache documentation to get more about 'logformat' and 'customer' order. Gzip_mod configuration directory The following is the MOD_GZIP configuration instruction, which can be added to your existing Apache httpd.conf configuration file. H Tip: It is highly recommended to add this information to Access.conf, so that you can't find the httpd.conf server. You can't find it. MOD_GZIP_ON [YES / NO] YES = MOD_GZIP will process the request to perform compression processing. NO = Disable mod_gzip. MOD_GZIP_ADD_HEADER_COUNT [YES / NO] YES = Add the header number to the Apache standard log information.

转载请注明原文地址:https://www.9cbs.com/read-24568.html

New Post(0)