Share your Apache experience with a 10 times-fold increase in _linux

Source: Internet
Author: User
This powerful module is mod_gzip. It compresses the pages of Apache by using the same compression algorithm as gzip, and can compress the page into one of the 10 original sizes. Where, if 10K page as long as 1K this is not speed up 10 times times. Of course, the general Web page can only reach 3-6 times. That's good, too. Right. Even a big web site like Google uses this technology. You're not up to it?
  
Such a good dongdong, come, I tell you how to install: 3 steps, 1, download, 2, modify configuration, 3, testing.
  
1. Download

To the Http://www.remotecommunications.com/apache/mod_gzip download mod_gzip.c and its patches.
  
2. Installation, configuration

Put Mod_gzip in your Apache source code directory, create a new Mod_gzip directory if you need a patch (for the 1.3.17.la version) to run:
Patch Mod_gizp.c
According to your needs, select Dynamic DSO in the configuration or statically compile into the Apache system. How to deal with in the Readme speak very clearly, such as-ADD-MODULE=MOD_GZIP.C, Make,make install and so on. It's not much to say here.
  
Add the following configuration to the httpd.conf tail.
  
# Mod_gzip Configuration
mod_gzip_on Yes
Mod_gzip_minimum_file_size 1002
Mod_gzip_maximum_file_size 0
Mod_gzip_maximum_inmem_size 60000
Mod_gzip_item_include MIME "application/x-httpd-php"
Mod_gzip_item_include MIME text/*
Mod_gzip_item_include MIME "Httpd/unix-directory"
Mod_gzip_dechunk Yes
Mod_gzip_temp_dir "/tmp"
Mod_gzip_keep_workfiles No
Mod_gzip_item_include file "\.php3$"
Mod_gzip_item_include file "\.txt$"
Mod_gzip_item_include file "\.html$"
Mod_gzip_item_exclude file "\.css$"
Mod_gzip_item_exclude file "\.js$"
  
Run after saving changes
.../bin/apachectl configtest ensure that configuration changes are correct.
Then use the apachectl Restart command to restart the service.
  
3. Modify, Test

It's a good programmer's habit to test before announcing it. In order not to affect the browsing of your users, we can use the new Apache driver on port 8080 or command to control the mod_gzip of the directory, rather than all of a sudden use of mod_gzip.
Usage is as follows:
  
Mod_gzip Configuration
  
You again with IE4 or Netscape serious comprehensive test again, no problem after you can let your users very happy to find ' xx site now very fast OH. '
  
Mod_gzip is really amazing, 100K html large documents as long as 12K can be uploaded to the user side. The more you use this technology, the more your users will be impressed by the high speed of your site. However, there will be lost, because decompression is done on the client, the effect and the user's browser has a certain relationship. The author tested the Msie4,5,5.5,netscape 4.5, and the 6 ran very well. But Java,jpg,gif and so on are unable to compress.

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.