Apache configuration optimization of transmission open gzip

1. Make sure apache has been compiled modules there mod_deflate module

2. Make sure the apache configuration file introduces compression module

 

 

3. Make sure to turn on the virtual host configuration Gzip compression, there are the following configuration, and restart apache service; if you want all the virtual hosts are to take effect, the following configuration unloading httpd.conf file and restart apache service

<Ifmodule mod_deflate.c>
DeflateCompressionLevel 9
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/plain text/xml
AddOutputFilterByType DEFLATE application/javscript
AddOutputFilterByType DEFLATE text/css
</Ifmodule>

 

Guess you like

Origin www.cnblogs.com/peteremperor/p/10931904.html