Web Servers on Windows - Apache 2.0.55 - Windows XP - mod_deflate compression

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Windows > April 2006 > Apache 2.0.55 - Windows XP - mod_deflate compression





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Apache 2.0.55 - Windows XP - mod_deflate compression
cheekeong.yong@gmail.com

2006-04-18, 12:45 am

I am trying to have Apache to compress the output from an J2EE
application server before it reaches the client browser.

I decided to setup a forward proxy using the samples from Apache
documentation using the httpd.conf file and started the server.

Summary, I am able to get the Apache proxy server working .

However, I am not able to get the J2EE application server output
compressed (using mod_deflate) before it reaches the browser when I set
the browser to use the newly setup Apache proxy.

Will subsequent browser request to the proxy server return compressed
output?

Do I have to do anything extra for dynamically generated page (JSPs,
Servlets) to get the mod_deflate working?

Thank you for any help on this.

Regards,
Chee Keong


Below are the details on what has been done for testing.

First, I uncomment all the "LoadModule proxy_module??????" lines
--------------------------------------------------------------
ProxyRequests On
ProxyVia On

<Proxy *>
Order deny,allow
Deny from all
Allow from MY_CLIENT_IP_ADDRESS
</Proxy>
-----------------------------------------------------------------
I was able to access the J2EE application using the newly configured
proxy.

Then after stopping the server , I decided to add the mod_deflate
configuration as given in the documentation. However, I noticed that my
download size (using a network tool call BitMeter) remain the same.

I tried to modify a few thing including changing the <Location /> tag
to <Location *> but it still does not compress.

Below is the sample from the documentation that I added to the end of
the configuration file.
------------------------------------------------------------------------------------
<Location />
# Insert filter
SetOutputFilter DEFLATE

# netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>
----------------------------------------------------------------------------------------------------------

cheekeong.yong@gmail.com

2006-04-18, 12:45 am

Note
--------
I got an startup error with the header append line. So, I commented the
line. Same results

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

Additional testing

I took out the whole <Location > tag contents and only add the line
SetOutputFilter DEFLATE at the last line of the file. However, same
results too.

Thanks for any hints or tips on what else to try.

Regards,
Chee Keong

cheekeong.yong@gmail.com

2006-04-18, 12:45 am

I did further debugging by enabling log for deflate in both format.

>From the logs, the ratio indicate no compression. What is the reason ?


Thanks for any help on this.

Regards,
Chee Keong

Deflate Log Format 1
----------------------------------------------------------------------------------
"GET http://pearl:7018/yantra/yfcicons/ipclose.gif HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/yfcicons/moreactions.gif HTTP/1.0" -/-
(-%)
"GET http://pearl:7018/yantra/console/scripts/dm.js HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/console/scripts/om.js HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/console/sc...cationreason.js
HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/console/scripts/tools.js HTTP/1.0" -/-
(-%)
"GET http://pearl:7018/yantra/extn/console/scripts/ref.js HTTP/1.0" -/-
(-%)
"GET http://pearl:7018/yantra/css/table.htc HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/css/table.htc HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/css/scripts/editabletbl.js HTTP/1.0" -/-
(-%)
"GET http://pearl:7018/yantra/css/table.htc HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/css/scripts/editabletbl.js HTTP/1.0" -/-
(-%)
"GET http://pearl:7018/yantra/yfcicons/lookup.gif HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/css/jade.css HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/yfcscripts/yfc.js HTTP/1.0" -/- (-%)
"GET
http://pearl:7018/yantra/console/SE...81210
325

4096%22%2BShipmentNo%3D%22100000039%22%2
F%3E
HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/yfcscripts/popup.js HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/common/alertmessages_en_US.js HTTP/1.0"
-/- (-%)
"GET http://pearl:7018/yantra/yfcscripts/Validation_en_US.js HTTP/1.0"
-/- (-%)
"GET http://pearl:7018/yantra/yfcscripts...tionRoutines.js
HTTP/1.0" -/- (-%)
"GET http://pearl:7018/yantra/yfcscripts/OnLoadRoutines.js HTTP/1.0"
-/- (-%)
"GET http://pearl:7018/yantra/yfcscripts...tionRoutines.js
HTTP/1.0" -/- (-%)
-----------------------------------------------------------------------------------

Deflate Log Format 2
----------------------------------------------------------------------------------------
"GET http://pearl:7018/yantra/css/jade.css HTTP/1.0" 37001 (-)
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
"GET http://pearl:7018/yantra/yfcscripts/yfc.js HTTP/1.0" 81386 (-)
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
"GET http://pearl:7018/yantra/console/SE9shipment.search HTTP/1.0"
50199 (-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)"
"GET http://pearl:7018/yantra/yfcscripts/popup.js HTTP/1.0" 8362 (-)
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
"GET http://pearl:7018/yantra/common/alertmessages_en_US.js HTTP/1.0"
6745 (-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)"
"GET http://pearl:7018/yantra/yfcscripts/Validation_en_US.js HTTP/1.0"
3165 (-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)"
"GET http://pearl:7018/yantra/yfcscripts...tionRoutines.js
HTTP/1.0" 8638 (-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
..NET CLR 1.1.4322)"
"GET http://pearl:7018/yantra/yfcscripts/OnLoadRoutines.js HTTP/1.0"
7926 (-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)"
"GET http://pearl:7018/yantra/yfcscripts...tionRoutines.js
HTTP/1.0" 3502 (-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
..NET CLR 1.1.4322)"
"GET http://pearl:7018/yantra/yfcscripts...tionRoutines.js
HTTP/1.0" 5126 (-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
..NET CLR 1.1.4322)"
"GET http://pearl:7018/yantra/yfcscripts/coolbuttons.js HTTP/1.0" 7280
(-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)"
"GET http://pearl:7018/yantra/extn/scripts/extn.js HTTP/1.0" 2613 (-)
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
"GET http://pearl:7018/yantra/extn/conso...ipts/menubar.js HTTP/1.0"
15209 (-) "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)"

----------------------------------------------------------------------------------------

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com