Failover patch for mod_vhost_alias

I use mod_vhost_alias extensively on my servers; it allows the dynamic creation of new virtual hosts without reloading apache. Instead, the incoming request’s ServerName is used to derive the path that the server should use as the DocumentRoot.

However, this had a major problem, at least for my purposes: if the path did not exist, it would generate a 404. I wanted it to fail over to another default DocumentRoot, which had a nice website explaining that the requested site didn’t exist (or perhaps doing something even more interesting, like providing a list of sites that DID exist). There was no option to do this in mod_vhost_alias, so I created the following patch.

This patch will cause mod_vhost_alias to check whether the transformed VirtualDocumentRoot exists for any given request; if it does not, then it will failover to the DocumentRoot instead. For this to work, you should define both VirtualDocumentRoot AND DocumentRoot for the same <VirtualHost> directive (if you are using it).

Please note that I make no warranty about the proper functioning of this code. Use it at your own risk. I’m not responsible for any damage that results from using this.

Patch file

Installation instructions:

  1. Make sure you have apache2 build tools. In debian, apt-get install apache2-dev
  2. Get an apache 2.2.3 source tree. On debian, apt-get source apache2
  3. Go to modules/mappers in the source tree.
  4. Patch the module: patch mod_vhost_alias.c /path/to/mod_vhost_alias_failover.patch
  5. Build the patched module: apxs2 -c mod_vhost_alias.c
  6. Now you have a new mod_vhost_alias.so in .libs under your current directory. Install this over your existing one (which you should probably back up) and you’re done.

AGDI Releases Quest For Glory 2 Remake

I don’t know about you, but I’ve been waiting for this for years. One of the best PC games ever, Quest For Glory 2, has been remade by Anonymous Game Developers Interactive, in stunning VGA graphics! This was a monumental effort by their team, with little to no financial reward. Hats off to all involved.

Find out more and download the game for FREE at their website: http://www.agdinteractive.com/homepage/homepage.html

A possible solution

After that last post, I had an idea for a possible solution. If every geek were to install Firefox on every Windows computer that they are ever asked to fix, eventually we will have Firefox on every computer.

Of course, that won’t guarantee that people will use it - after all, given the choice between “Internet Explorer” and “Mozilla Firefox”, which do you think Joe Schmoe is going to choose when he wants to explore the internet? To him, “Mozilla” and “Firefox” are just gibberish. That is just bad marketing.

Let’s make a re-branded version of Firefox, called something like “The Internet”. With a neat, internety-looking icon. Then we’ll install it on every Windows computer in the world. And people will use it, because it’s called “The Internet”. What should I do to look at my hotmail? Ah! I’ll just open “The Internet”! Easy peasy.

Then, maybe Internet Explorer will finally go away.

Dear Microsoft: why not throw in the towel?

I have a serious question that I would like to ask Microsoft. Why not just throw in the towel when it comes to the web browser market? You are spending considerable resources developing Internet Explorer, but no matter what you do, it will always be inferior to Mozilla, Opera, and now even Safari on Windows. You steal the majority of market share from these superior products because your operating system users don’t know any better (didn’t you lose an antitrust suit forbidding you from bundling IE? What happened to that?). And how much revenue do you make from Internet Explorer? Considering it is a free product, my guess would have to be zero.

Mozilla is open source software. The Mozilla Public License explicitly allows you to rebrand Firefox (say, as Internet Explorer 9) and ship it. Why not just give up on IE, and take from the open source community instead? Everyone would be happier: your users would be happier that their browser experience is better, and web developers across the globe would rejoice at the better standards support that your new browser offers. And all of it would cost you exactly zero dollars. In corporate terms, that is the deal of a lifetime. So what gives? Why are you still pushing IE? Why are you spending man-years of labor at considerable expense to create another version of IE, when it will still be inferior to everything else on the market?

Please. Enough already. Focus on products that make you money, like Windows and Office. Leave the browser market to people who give a crap about web standards.

I would like to issue a pledge. If Microsoft gets rid of Internet Explorer, and starts shipping a rebranded Gecko-based browser instead, I will give $10,000 US to whomever is responsible for making this decision. That may not be a lot to you, but it is to me. I’m sure if every web developer on the planet was given the chance, they would also kick in a few bucks to this fund. So, Mr. (or Mrs.) Microsoft Big Wig, there could be hundreds of millions of dollars in it for you if you can make this happen.

Dumb Ads, Vol. 1: Circuit City

I see some dumb ads on television, and what better place to complain about them? This one caught my attention recently:

The Product: Circuit City
The Ad: (YouTube Video, no audio)
[Circuit City sales associate (CCSA) is watching a scantily clad singer in a music video]
CCSA: Man, Rhianna is so…
[Girl interrupts him from behind]
Girl: (Sarcastically) …talented?
CCSA: (Sheepishly) Uh, absolutely!
Girl: (Flirtatiously) I guess she’s pretty hot too.
CCSA: Yeah, and this computer can play all your music [CCSA is startled by approach of Girl's father] uhhh, after you study, of course!
[Circuit city gives their pitch. CCSA and Girl can be seen exchanging furtive glances whilst exploring the laptop as though it represents their unspoken sexual connection]

The Hidden Message: Come to Circuit City, where your whore of a daughter will flirt with our pedophile of a sales associate right before your eyes!

Next Time: Maybe make a convincing pitch for your prices and/or service instead of making futile pop-culture references. Yeah, computers play music. We get it. Why should we get them at your store?