skip to main bit
a man slumped on his desk, from 'The Sleep of Reason Produces



Virtual subdomains for open webapps

I’ve been playing around with Firefox’s open web app designs recently. I hadn’t quite realised before that if you have Firefox on Android and your PC, you can run their webapps on FirefoxOS, Android and the desktop, which is pretty impressive. Their payment and push notification infrastructure is exciting too.

One small gotcha is that when you write a webapp, it’s better if you host it on its own individual subdomain (for reasons! Security reasons!).

As it turns out, if you can get your DNS provider to add a line like this to your DNS zone file:

…you can add something like this to your Apache configuration, and create an infinite number of apps in their own domains (so that would map to pages stored in /var/www/apps/foo )

You’ll need to enable the mod_vhost_alias module, which you can do in standard Ubuntu and Debian by typing  sudo a2enmod vhost_alias 


Tags: , ,

Comments are closed.


petit disclaimer:
My employer has enough opinions of its own, without having to have mine too.