<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Dumbrella Hosting</title>
		<link>http://www.dumbrellahosting.com/</link>
		<atom:link href="http://www.dumbrellahosting.com/index.xml" rel="self" type="application/rss+xml" />
		<description>The pseudo-corporate blog for Phillip Karlsson &#x26;amp; Dumbrella Hosting</description>
		<language>en-us</language>
		<copyright>All content &#x26;copy; 2006-2009 Dumbrella Hosting, LLC.</copyright> 
		<pubDate>Sun, 19 Jul 2009 12:24:44 -0400</pubDate>
		<ttl>60</ttl>
		<image>
			<url>http://www.dumbrellahosting.com/images/small_logo.png</url>
			<title>Dumbrella Hosting</title>
			<link>http://www.dumbrellahosting.com/</link>
			<width>130</width>
			<height>145</height>
		</image>
		<item>
			<title> Diego Comic-Con 2009: The Sequel ^ 8</title>
			<link>http://www.dumbrellahosting.com/forums/news/6609/</link>
			<guid isPermaLink="true">http://www.dumbrellahosting.com/forums/news/6609/</guid>
			<dc:creator>phillip</dc:creator>
			<category>Conventions</category>
			<category>San Diego</category>
			<category>Comic-Con</category>
			<category>Dumbrella</category>
			<category>Conventions</category>
			<pubDate>Sun, 19 Jul 2009 12:24:44 -0400</pubDate>
			<description>On Wednesday, San Diego Comic-Con starts.
This will be the 8th year I&#x27;ve been there, and they&#x27;ve gotten more fun every year.  However, I&#x27;m not sure there&#x27;s much that could top last year, which I consider to be incentive for everyone involved to try harder.
As usual, I&#x27;ll be at booth 1335/1337 with the Dumbrella crew. With me this year are:

	Andy Bell
	r stevens
	Sam Brown
	Jon Rosenberg
	Meredith Gran
	Chris Yates

If I&#x27;m feeling inspired I&#x27;ll get our crappy, outdated boothcam working and post it here, but I make no promises.</description>
			<content:encoded><![CDATA[<p>On Wednesday, San Diego Comic-Con starts.</p>
<p>This will be the 8<sup>th</sup> year I've been there, and they've gotten more fun every year.  However, I'm not sure there's much that could top last year, which I consider to be incentive for everyone involved to try harder.</p>
<p>As usual, I'll be at booth 1335/1337 with the Dumbrella crew. With me this year are:</p>
<ul>
	<li><a href="http://www.creaturesinmyhead.com/">Andy Bell</a></li>
	<li><a href="http://www.dieselsweeties.com/">r stevens</a></li>
	<li><a href="http://www.explodingdog.com/">Sam Brown</a></li>
	<li><a href="http://www.goats.com/">Jon Rosenberg</a></li>
	<li><a href="http://www.octopuspie.com/">Meredith Gran</a></li>
	<li><a href="http://www.chrisyates.net/">Chris Yates</a></li>
</ul>
<p>If I'm feeling inspired I'll get our crappy, outdated boothcam working and post it here, but I make no promises.</p>]]></content:encoded>
		</item>
		<item>
			<title>The end of GeoCities</title>
			<link>http://www.dumbrellahosting.com/forums/news/6357/</link>
			<guid isPermaLink="true">http://www.dumbrellahosting.com/forums/news/6357/</guid>
			<dc:creator>phillip</dc:creator>
			<category>Miscellany</category>
			<category>geocities</category>
			<category>theglobe.com</category>
			<pubDate>Fri, 24 Apr 2009 06:41:06 -0400</pubDate>
			<description>Apparently, Yahoo is shutting down GeoCities at some point this year. To me, this marks an end, of sorts, to the original dot-com era. Back in my days at theglobe.com, my primary project was our homepage builder. Eventually had some marketing-oriented name for it (uBuilder?), but not for most of the time I was working on it. It originated as a way for users of our web based chat system to upload personal icons, and ended up as a GeoCities competitor. The big thing, I felt, that made us &#x22;better&#x22;, were that we didn&#x27;t have complicated URLs based on which &#x22;community&#x22;...</description>
			<content:encoded><![CDATA[<p>Apparently, Yahoo is <a href="http://help.yahoo.com/l/us/yahoo/geocities/geocities-05.html">shutting down GeoCities</a> at some point this year.  To me, this marks an end, of sorts, to the original dot-com era.</p>
<p>Back in my days at theglobe.com, my primary project was our homepage builder.  Eventually had some marketing-oriented name for it (uBuilder?), but not for most of the time I was working on it.  It originated as a way for users of our web based chat system to upload personal icons, and ended up as a GeoCities competitor.<p>
<p>The big thing, I felt, that made us "better", were that we didn't have complicated URLs based on which "community" your page was in, we just had "members.theglobe.com/username/" style URLs.  Also, I think our page building tools were better and more flexible.  On the downside, I think at our peak, we had about 1-5% of the traffic that GeoCities did (although over a million page views in a day was a big deal back in 1997, on 1997 era hardware).  On the upside, in 1997, the only developer working on this project was me, so our development team was cheaper.<p>
<p>But for fun, here's <a href="http://www.goats.com/">Jon</a>'s <a href="http://web.archive.org/web/19990218065347/http://members.theglobe.com/rez/">page</a>.  We made ones for toothgnip and diablo too, but they don't seem to be archived.</p>]]></content:encoded>
		</item>
		<item>
			<title>Apache deflation and negotiation</title>
			<link>http://www.dumbrellahosting.com/forums/news/6330/</link>
			<guid isPermaLink="true">http://www.dumbrellahosting.com/forums/news/6330/</guid>
			<dc:creator>phillip</dc:creator>
			<category>Technical</category>
			<category>apache</category>
			<category>mod_deflate</category>
			<category>content negotiation</category>
			<pubDate>Fri, 17 Apr 2009 16:38:26 -0400</pubDate>
			<description>Sometimes, wasting time isn&#x27;t entirely unproductive. This week, while thinking of getting work done on some longer term projects that are standing nearby and mocking me, I somehow got conned into installing Yahoo&#x27;s YSlow Firefox extension. It&#x27;s pretty cool in a masochistic sort of way. It gives you a performance evaluation of whatever site you&#x27;re looking at, based on &#x22;best practices&#x22; for HTML, server configs, etc. In my case, the one thing that popped out at me while looking at my homepage here, was that I wasn&#x27;t compressing any of the &#x22;text&#x22; content (HTML, CSS, JavaScript, RSS feeds, etc.) that the...</description>
			<content:encoded><![CDATA[<p>Sometimes, wasting time isn't entirely unproductive.</p>
<p>This week, while thinking of getting work done on some longer term projects that are standing nearby and mocking me, I somehow got conned into installing Yahoo's <a href="http://developer.yahoo.com/yslow/">YSlow</a> Firefox extension.</p>
<p>It's pretty cool in a masochistic sort of way.  It gives you a performance evaluation of whatever site you're looking at, based on "best practices" for HTML, server configs, etc.  In my case, the one thing that popped out at me while looking at <a href="http://www.dumbrellahosting.com/">my homepage</a> here, was that I wasn't compressing any of the "text" content (HTML, CSS, JavaScript, RSS feeds, etc.) that the machines serve.  Server side auto-compression is one of those things that I remember looking at a few years ago before being distracted by the next shiny bauble that prevented me actually doing anything about it.</p>
<p>The idea is to auto-compress any text being served back so that the payload delivered to the clients (you and your web browser) is smaller, gets to you faster, and loads faster.  Computers are fast enough, and the files are small enough that the compression speed-hit is far outweighed by the network latency speed-gain.</p>
<p>As an added bonus, since the server has to hold the network connection, with all it's associated memory and resource usage, open until the client is finished getting all its content, this frees up those resources a little bit faster.</p>
<p>The first step was enabling <a href="http://www.dumbrellahosting.com/">apache</a>'s <a href="http://httpd.apache.org/docs/2.2/mod/mod_deflate.html">mod_deflate</a> module.  This seems simple enough, the docs even have a perfect example right at the top:</p>
<blockquote>
<p><b>Compress only a few types</b></p>
<p><tt>AddOutputFilterByType DEFLATE text/html text/plain text/xml</tt></p>
</blockquote>
<p>Nifty!  Now let's check the documentation for <a href="http://httpd.apache.org/docs/2.2/mod/core.html#addoutputfilterbytype">AddOutputFilterByType</a>:</p>
<blockquote>Compatibility:	Available in Apache 2.0.33 and later; deprecated in Apache 2.1 and later</blockquote>
<p>Well, crap.</p>
<p>I'm running Apache 2.2 (which is also what all the documentation links point to), so I probably shouldn't <em>start</em> by implementing this with a deprecated config directive.</p>
<p>It <em>does</em> point us in the direction of its replacement, the <a href="http://httpd.apache.org/docs/2.2/mod/mod_filter.html">mod_filter</a> module.  Reading through all this documentation is not entirely unconfusing, as there are a lot of parts without a very coherent picture of a whole.  At the end of the day, what it comes down to is that I need to first define my filter, and then apply it where and how I want to.  To define it, I put at the top of my config:<br>
<code class="terminal">
FilterDeclare	compress-response<br>
FilterProvider	compress-response	DEFLATE	resp=Content-Type $text/<br>
FilterProvider	compress-response	DEFLATE	resp=Content-Type $application/x-javascript<br>
</code><br>
This declares a filter with the name "compress-response" and then says that it should be applied to anything with a MIME-Type starting with "text/" (i.e. text/html), or "application/x-javascript".  Further down, in the virtual hosts that I want to use this compression, I need to add the line:<br>
<code class="terminal">
FilterChain		compress-response
</code><br>
Nice and easy!
<p>For the purposes of full disclosure, there's also some stuff in the mod_deflate documentation that I used for determining browsers where this will and won't work, so the full set of directives is:<br>
<code class="terminal">
&lt;Location /&gt;<br>
	# Insert filter<br>
	BrowserMatch	^Mozilla/4			gzip-only-text/html<br>
	BrowserMatch	^Mozilla/4\.0[678]	no-gzip<br>
	BrowserMatch	\bMSIE				!no-gzip !gzip-only-text/html<br>
	# Make sure proxies don't deliver the wrong content<br>
	Header			append				Vary User-Agent env=!dont-vary<br>
	<br>
	FilterChain		compress-response<br>
&lt;/Location&gt;
</code><br>
I'll probably eliminate a bunch of those at some point as I don't think we need to worry about Netscape 4 a whole lot these days.</p>
<p>This worked, and made me happy.  It's been live for most of this week, and nobody noticed, commented, or complained.  Success!</p>
<p>What bugged me about this, is that while compressing on the fly makes sense for all the dynamic pages (most of mine and my clients' sites), it seems like a waste of resources for things like the JavaScripts served back from <a href="http://www.ohnorobot.com/">OhNoRobot</a>, which are written to disk and then served back multiple times.  It makes more sense to zip them once, when they're being written, and then serve those back to the clients that can handle it.</p>
<p>I'm about a decade too late to be the first person to think of this, so it's also conveniently built into Apache.  <a href="http://httpd.apache.org/docs/2.2/content-negotiation.html">Content Negotiation</a> also supports sending back pages in multiple languages, but for my purposes I wanted to send back a ".gz" file instead of a ".js" if there was one available.  The two important things to do are: add <code class="inline">MultiViews</code> to your enabled Options, and do an <code class="inline">AddEncoding</code> for the .gz files:<br>
<code class="terminal">
&lt;Location "/js/"&gt;<br>
	Options		+MultiViews<br>
	ForceType		"application/x-javascript"<br>
	AddEncoding	x-gzip		.gz<br>
&lt;/Location&gt;
</code><br>
I also had to add the <code class="inline">ForceType</code> directive, because otherwise the .gz version of the file would be served back with <code class="inline">Content-Type: application/x-gzip</code> instead of as JavaScript.  The other thing that wasn't immediately clear in the documentation is that in order to support the content negotiation for .gz or .js, you need to have both files there, but both need to be a ".js" file <em>plus</em> the encoding suffix, so (for example) <a href="http://www.ohnorobot.com/index.pl?comic=23">Dinosaur Comics</a> needs to have both "/js/23.js.js" and "/js/23.js.gz" on disk.</p>
<p>If you want to test this using curl from the command line, add "<code>-H "Accept-Encoding: gzip,deflate"</code>" to your requests, e.g.:
<code class="terminal">curl -vI -H "Accept-Encoding: gzip,deflate" http://www.dumbrellahosting.com/</code></p>
<p>As a final remark, I'm pretty sure that most of the above is pretty obvious to all <strong>good</strong> Apache administrators.  However, for those of us doing that as just one part of a larger job, it seems remarkably difficult to find a coherent set of task-oriented how-tos.  Mostly I document this so I'll remember what the hell I was thinking when I look at this config again next year.</p>]]></content:encoded>
		</item>
		<item>
			<title>Webcomics Weekend</title>
			<link>http://www.dumbrellahosting.com/forums/news/6251/</link>
			<guid isPermaLink="true">http://www.dumbrellahosting.com/forums/news/6251/</guid>
			<dc:creator>phillip</dc:creator>
			<category>Conventions</category>
			<category>New England Webcomics Weekend</category>
			<category>Webcomics Weekend</category>
			<category>conventions</category>
			<pubDate>Thu, 19 Mar 2009 21:39:55 -0400</pubDate>
			<description>A little late on the uptake, but it is 99% certain that I will be in Easthampton this weekend for the epic New England Webcomics Weekend.
I&#x27;m looking forward to being at a gathering and not working! (too much.)</description>
			<content:encoded><![CDATA[<p>A little late on the uptake, but it is 99% certain that I will be in Easthampton this weekend for the epic <a href="http://www.webcomicsweekend.com/">New England Webcomics Weekend</a>.</p>
<p>I'm looking forward to being at a gathering and not working! (too much.)</p>]]></content:encoded>
		</item>
		<item>
			<title>mod_perl2 and libapreq2 on Mac OS X Leopard</title>
			<link>http://www.dumbrellahosting.com/forums/news/6078/</link>
			<guid isPermaLink="true">http://www.dumbrellahosting.com/forums/news/6078/</guid>
			<dc:creator>phillip</dc:creator>
			<category>Technical</category>
			<category>mod_perl</category>
			<category>mod_perl2</category>
			<category>libapreq</category>
			<category>libapreq2</category>
			<category>perl</category>
			<category>cpan</category>
			<category>Leopard</category>
			<category>Mac OS X</category>
			<category>architecture</category>
			<pubDate>Wed, 21 Jan 2009 12:27:25 -0500</pubDate>
			<description>Just to document this somewhere... I wanted to get mod_perl2 (and the associated libapreq2) running under the web server on my MacBook Pro. However, when you just install them from CPAN, you get the following error from apache: Cannot load /usr/libexec/apache2/mod_perl.so into server: dlopen(/usr/libexec/apache2/mod_perl.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_perl.so: no matching architecture in universal wrapper (Once you fix this, you get a similar error for libapreq2: Cannot load /usr/libexec/apache2/mod_apreq2.so into server: dlopen(/usr/libexec/apache2/mod_apreq2.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_apreq2.so: mach-o, but wrong architecture Documented here purely for search engine indexing purposes.) It turns out that the fix is two-fold....</description>
			<content:encoded><![CDATA[<p>Just to document this somewhere...</p>
<p>I wanted to get <a href="http://perl.apache.org/">mod_perl2</a> (and the associated <a href="http://httpd.apache.org/apreq/">libapreq2</a>) running under the web server on my MacBook Pro.</p>
<p>However, when you just install them from <a href="http://search.cpan.org/">CPAN</a>, you get the following error from apache:<br>
<code class="terminal">Cannot load /usr/libexec/apache2/mod_perl.so into server: dlopen(/usr/libexec/apache2/mod_perl.so, 10): no suitable image found.  Did find:\n\t/usr/libexec/apache2/mod_perl.so: no matching architecture in universal wrapper</code></p>
<p>(Once you fix this, you get a similar error for libapreq2:<br>
<code class="terminal">Cannot load /usr/libexec/apache2/mod_apreq2.so into server: dlopen(/usr/libexec/apache2/mod_apreq2.so, 10): no suitable image found.  Did find:\n\t/usr/libexec/apache2/mod_apreq2.so: mach-o, but wrong architecture</code><br>
Documented here purely for search engine indexing purposes.)</p>
<p>It turns out that the fix is two-fold.</p>
<p>The root cause is that the Mac now supports multiple different chip architectures, to see this, run the <code class="inline_code">file</code> command on an executable:<br>
<code class="terminal">$ file /usr/sbin/httpd<br>
/usr/sbin/httpd: Mach-O universal binary with 4 architectures<br>
/usr/sbin/httpd (for architecture ppc7400):	Mach-O executable ppc<br>
/usr/sbin/httpd (for architecture ppc64):	Mach-O 64-bit executable ppc64<br>
/usr/sbin/httpd (for architecture i386):	Mach-O executable i386<br>
/usr/sbin/httpd (for architecture x86_64):	Mach-O 64-bit executable x86_64
</code><br>
or:<br>
<code class="terminal">$ file /usr/bin/perl<br>
/usr/bin/perl: Mach-O universal binary with 2 architectures<br>
/usr/bin/perl (for architecture ppc7400):	Mach-O executable ppc<br>
/usr/bin/perl (for architecture i386):	Mach-O executable i386</code></p>
<p>The problem is in mixing architectures, and that cpan (or gcc, or perl, or the default environment, or something), only compiles for the i386 architecture by default.  After some googling, I learned that the solution is that you need to &quot;force&quot; cpan to compile the shared libraries for both the i386 and the x86_64 architectures.  To do this you need to run:<br>
<code class="terminal">$ export ARCHFLAGS="-arch i386 -arch x86_64"<br>
$ export CFLAGS="-arch i386 -arch x86_64"</code><br>
(or add those lines to <code class="inline_code">~/.profile</code> and open a new terminal window.)</p>
<p>However, after that libapreq2 <em>still</em> fails, which brings me to why I'm writing this.  The <em>only</em> link I found with a solution was:
<a href="http://my.opera.com/ismailp/blog/2008/09/05/svn-web-on-mac-os-x-leopard">http://my.opera.com/ismailp/blog/2008/09/05/svn-web-on-mac-os-x-leopard</a>:</p>
<blockquote><p>I simply had to hack libapreq2's Makefile.PL and changed following line:<br>
<code class="terminal">my $cmd = "./configure $opts";</code><br>
to:<br>
<code class="terminal">my $cmd = "./configure $opts --disable-dependency-tracking";</code></p></blockquote>
<p>Then, clean up my previous attempts, run the make/install process again, and <code class="inline_code">httpd -t</code> (or <code class="inline_code">apachectl configtest</code>) suddenly work.</p>
<p>Undoubtedly, DBI or something will break next, but at least it's a start.</p>]]></content:encoded>
		</item>
		<item>
			<title>excuses, excuses...</title>
			<link>http://www.dumbrellahosting.com/forums/news/5886/</link>
			<guid isPermaLink="true">http://www.dumbrellahosting.com/forums/news/5886/</guid>
			<dc:creator>phillip</dc:creator>
			<category>Hosting News</category>
			<category>nagios</category>
			<category>bug fixes</category>
			<category>Charlie Stross</category>
			<category>procrastination</category>
			<pubDate>Tue, 25 Nov 2008 13:17:11 -0500</pubDate>
			<description>Man... I wish I had excuses this good for never updating.
Instead I&#x27;m dealing with optimizing memory usage of older code, adding caching where necessary, and trying to get a handle on nagios.  Much more boring.</description>
			<content:encoded><![CDATA[<p>Man... I wish I had excuses <a href="http://www.antipope.org/charlie/blog-static/2008/11/copy_edits.html">this good</a> for never updating.</p>
<p>Instead I'm dealing with optimizing memory usage of older code, adding caching where necessary, and trying to get a handle on <a href="http://www.nagios.org/">nagios</a>.  Much more boring.</p>]]></content:encoded>
		</item>
	</channel>
</rss>
