June 1st, 2009

Enterprise Bridge

MythWeb from behind the firewall

Backstory: I've been using a dedicated Linux box as my personal DVR for several years now, running MythTV. It's been an adventure, for like my TiVo, MythTV (using Hauppauge PVR cards with tuners and hardware MPEG-2 encoders) will record in the same format used on DVDs. Unlike the TiVo, the act of extracting video and building a DVD is fairly painless. Also, since MythTV has much more available in terms of RAM and disk resources, not to mention a totally open architecture, it has a very nice web front-end so I can manage recordings and schedules from somewhere beyond my living room.

Around the 0.18 or 0.19 release, the MythWeb module was heavily rewritten. It became a lot more powerful, but the side effect was that it broke compatibility with the reverse-proxy module in Apache 1.3. It would still work, but you had to mirror the MythTV's web server directory tree structure in the firewall. The 1.3 proxy modules could only rewrite HTTP protocol headers. An Apache module, mod_proxy_html, exists to rewrite links inside the body of an HTML document, but it was only compatible with Apache 2.0 and later. I didn't get around to upgrading from 1.3 until I was forced to rebuild the services/firewall host this spring when the original box began to die. The solution works very nicely, but I had a couple of speed bumps worth documenting... Collapse )