About how to enable zlib gzip compression configuration in PHP

WBOY
Release: 2016-07-25 08:58:59
Original
963 people have browsed it
  1. zlib.output_compression = Off
  2. ;zlib.output_compression_level = -1
Copy the code

and modify it to:

  1. zlib.output_compression = On
  2. zlib.output_compression_level = 6
Copy code

where, the number 6 of zlib.output_compression_level = 6 is the compression ratio

2. Open the apache configuration file httpd.conf, configure and load deflate_module, and find #LoadModule deflate_module modules/mod_deflate.so Remove the "#" sign in the front of the comment

3. Restart apache and test whether compression is enabled on the website.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!