<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ian Winter &#187; compression</title>
	<atom:link href="http://ianwinter.co.uk/tag/compression/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianwinter.co.uk</link>
	<description>Have you found the instructions yet?</description>
	<lastBuildDate>Thu, 13 May 2010 21:03:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>mod_gzip is your friend</title>
		<link>http://ianwinter.co.uk/2007/01/25/modgzip-is-your-friend/</link>
		<comments>http://ianwinter.co.uk/2007/01/25/modgzip-is-your-friend/#comments</comments>
		<pubDate>Thu, 25 Jan 2007 13:15:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[To save bandwidth on one off the servers I look after I decided to implement mod_gzip. The server in questions is running RedHat ES3, apache 1.3.37, Coldfusion 7.0.2 and has the cPanel/WHM control panel. First off was to get mod_gzip compiled, now this can be done manually, download a pre compiled one or in my [...]]]></description>
			<content:encoded><![CDATA[<p>To save bandwidth on one off the servers I look after I decided to implement mod_gzip.</p>
<p>The server in questions is running RedHat ES3, apache 1.3.37, Coldfusion 7.0.2 and has the cPanel/WHM control panel.</p>
<p>First off was to get mod_gzip compiled, now this can be done manually, download a pre compiled one or in my case just go into WHM and rebuild apache with the mod_gzip box checked. The version it puts in is 1.3.26.1a.</p>
<p>As I&#8217;d already got Coldfusion running on this webserver the resulting httpd.conf file it creates became invalid so I had to move a few things about. To cut to the chase the order in which modules load is crucial with Coldfusion due to the was the mod_gzip and mod_jrun modules work intercepting requests. The following is my httpd.conf (abbriviated) with the relevant sections.</p>
<p><code>LoadModule ...<br />
--snip--<br />
LoadModule jrun_module /usr/local/coldfusionmx7/runtime/lib/wsconfig/1/mod_jrun.so<br />
&lt;IfModule mod_jrun.c&gt;<br />
    JRunConfig Verbose false<br />
    JRunConfig Apialloc false<br />
    JRunConfig Ssl false<br />
    JRunConfig Ignoresuffixmap false<br />
    JRunConfig Serverstore /usr/local/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store<br />
    JRunConfig Bootstrap 127.0.0.1:51011<br />
    #JRunConfig Errorurl &lt;optionally redirect to this URL on errors&gt;<br />
    #JRunConfig ProxyRetryInterval 600<br />
    #JRunConfig ConnectTimeout 15<br />
    #JRunConfig RecvTimeout 300<br />
    #JRunConfig SendTimeout 15<br />
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf<br />
&lt;/IfModule&gt;<br />
LoadModule gzip_module        libexec/mod_gzip.so<br />
&lt;IfModule mod_gzip.c&gt;<br />
   mod_gzip_on Yes<br />
   mod_gzip_can_negotiate Yes<br />
   mod_gzip_static_suffix .gz<br />
   AddEncoding gzip .gz<br />
   mod_gzip_update_static No<br />
   mod_gzip_command_version '/mod_gzip_status'<br />
   mod_gzip_temp_dir /tmp<br />
   mod_gzip_keep_workfiles No<br />
   mod_gzip_minimum_file_size 500<br />
   mod_gzip_maximum_file_size 500000<br />
   mod_gzip_maximum_inmem_size 60000<br />
   mod_gzip_min_http 1000<br />
   mod_gzip_handle_methods GET POST<br />
   mod_gzip_item_exclude file .js$<br />
   mod_gzip_item_exclude file .css$<br />
   mod_gzip_item_exclude file .swf$<br />
   mod_gzip_item_exclude mime ^image/<br />
   mod_gzip_item_include file .php$<br />
   mod_gzip_item_include file .cfm$<br />
   mod_gzip_item_include file .jsp$<br />
   mod_gzip_item_exclude file .pdf$<br />
   mod_gzip_item_include file .fic$<br />
   mod_gzip_item_include file .html$<br />
   mod_gzip_item_include file .htm$<br />
   mod_gzip_item_include mime ^text/html<br />
   mod_gzip_item_include mime ^text/plain<br />
   mod_gzip_item_include mime ^text/xml<br />
#mod_gzip_item_include mime ^application/force_download$<br />
#mod_gzip_item_include mime ^application/pdf$<br />
   mod_gzip_item_include handler type-coldfusion<br />
   mod_gzip_item_include handler jrun-handler<br />
   mod_gzip_dechunk Yes<br />
#then the logging directives<br />
   LogFormat "%h %l %u %t "%V %r" %&lt;s %b mod_gzip: %{mod_gzip_result}n In:%{mo<br />
d_gzip_input_size}n -&lt; Out:%{mod_gzip_output_size}n = %{mod_gzip_compression_rat<br />
io}n pct." common_with_mod_gzip_info2<br />
   CustomLog "logs/mod_gzip.log" common_with_mod_gzip_info2<br />
   mod_gzip_add_header_count Yes<br />
   mod_gzip_send_vary On<br />
&lt;/IfModule&gt;<br />
AddType type-coldfusion .fic<br />
--snip--<br />
ClearModuleList<br />
AddModule ...<br />
--snip--<br />
AddModule mod_jrun.c<br />
AddModule mod_gzip.c</code></p>
<p>In my test case I had a page show as 18224 bytes originally which compressed down to 3956 bytes a saving of 14268 bytes or 79%! To test the compression I was using the <a href="http://www.port80software.com/tools/compresscheck.asp">port80software.com</a> compression check. You can also see <a href="http://www.port80software.com/tools/compresscheck.asp?url=flatpackedworld.co.uk%2Fblog%2F">this site&#8217;s</a> report.</p>
<p>More Information (stuff I read):</p>
<ul>
<li><a href="http://www.owensperformance.com/blog_content.cfm?articleid=206">owensperformance.com</a> &#8211; cheers Irvin!
</li>
<li><a href="http://sourceforge.net/projects/mod-gzip/">mod_gzip on sourceforge</a>
</li>
<li><a href="http://schroepl.net/projekte/mod_gzip/install.htm">How to install mod_gzip</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2007/01/25/modgzip-is-your-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
