I recently deployed my node.js proxy server, removing all traces of Apache2 from my main server. During the course of this transition I discovered:
- Bugs in my code
Not unexpected, in all honesty.
There were two main issues; the first was relating to how I handled the 304 response, the second was relating to how I performed rewrites for my mercurial repository vhost.
- Bugs in node.js
Given how new node.js is there wasn't a huge surprise here either, although I thought I'd been good testing against 0.2.x. As it turned out I needed to run the more recent 0.4.x to avoid a couple of issues:
- HTTP headers are lower-cased
- ECONNREFUSED was not being caught the way that I expected.
In short I have a backported node.js package for Squeeze which is almost worthless. I'll update it in the near future. For the moment:
cd node-v0.4.3/ ./configure --without-ssl --prefix=/opt/node-0.4.3 && make && make install ln -fs /opt/node-0.4.3 /opt/node
- Oddities in thttpd
- thttpd is what actually runs my websites and I discovered during some extended debugging sessions that it just does not like HTTP requests starting with a doubled "/" character.
For example this works fine:
But this fails:
Previously it seems that Apache was (silently) fixing this up before it proxied requests. Now I have to do it myself, no big thing, but still a surprise.
All in all it was worth it to be able to run:
dpkg --purge libapache2-mod-rpaf \ apache2.2-common \ apache2.2-bin \ apache2-utils \ apache2-mpm-prefork \ apache2 \ libaprutil1-dbd-sqlite3 \ libaprutil1-ldap \ libaprutil1 \ libapr1
ObQuote: "Bad news. The fog's getting thicker." - Airplane!