PHP implements gzip configuration method in Apache environment, Apachegzip
The example in this paper describes how PHP implements gzip configuration in Apache environment. Share to everyone for your reference. Specific as follows:
1, conf/httpd.conf
1) Remove #loadmodule headers_module modules/mod_headers.so in front of the note #,
2) Add LoadModule deflate_module modules/mod_deflate.so,
3) Remove the comment # in front of # include conf/extra/httpd-vhosts.conf.
2, conf/extra/httpd-vhosts.conf
Add in VirtualHost
Setoutputfilter DEFLATE browsermatch ^MOZILLA/4 gzip-only-text/html browsermatch ^mozilla/4\.0[678] No-gzip Browsermatch \bmsie!no-gzip!gzip-only-text/html setenvifnocase request_uri \. (?: gif|jpe?g|png) $ no-gzip dont-vary Header append vary user-agent env=!dont-vary
For example:
DocumentRoot "d:/apache2.2/htdocs/wef"
setoutputfilter DEFLATE browsermatch ^MOZILLA/4 gzip-only-text/html browsermatch ^mozilla/4\.0[678] no-gzip browsermatch \bmsie!no-gzip!gzip-only-text/ HTML setenvifnocase request_uri \. (?: gif|jpe?g|png) $ no-gzip dont-vary Header append vary user-agent env=! Dont-vary
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/978384.html www.bkjia.com true http://www.bkjia.com/PHPjc/978384.html techarticle PHP in the Apache environment to implement the Gzip configuration method, Apachegzip This example of PHP in the Apache environment to implement the Gzip configuration method. Share to everyone for your reference. Specific as follows: 1, con ...