网页压缩配置

   下载apache最新版本 2.2.11,在windows 本机上上测试网页压缩的配置。
   ProxyPass /oil ajp://172.18.7.251:8009/oil
ProxyPassReverse /oil ajp://172.18.7.251:8009/oil

ProxyPass /oilreport ajp://172.18.7.251:18009/oilreport
ProxyPassReverse /oilreport ajp://172.18.7.251:18009/oilreport


DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate.log deflate

<Location /oil>
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
</Location>

<Location /oilreport>
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
</Location>

   apache 的跨平台特性真不错,把上述配置到linux上,一切ok,非常顺利。
   网页压缩配置好后,通过在外汇的外网访问测试了一下,速度快多了。

你可能感兴趣的:(apache,html,linux,windows)