I do a lot of web development these days, on number of projects, which often require their own domain, so I thought I’d share a quick tip that I’ve found helpful.

In a nutshell, I use wildcard domains and used the Apache vhost alias module in order to be able to automatically create a domain per project.

Setting up bind

The first step is to set up wildcard DNS for your machine, in this case *.dev.mymachine. Assuming you’ve got bind set up, this is just a matter of configuring a local zone for your network (or adding this to your existing local zone).

It’s late, and I’m tired, Google “wildcard dns bind” and that’ll point you in the right direction.

Setting up the vhost

Next, you need to set up an Apache vhost for your wildcard domain, but crucially, instead of specifying DocumentRoot in the normal way define VirtualDocumentRoot.

First, enable the module:


a2enmod vhost_alias

Then, set up and enable a definition which uses variables supplied by the vhost_alias, which will use the structure of the url line to load the appropriate web page.


<VirtualHost *>

ServerAdmin webmaster@myhost.com
ServerName myhost.com
ServerAlias *.myhost.com

# Indexes + Directory Root.
DirectoryIndex index.html index.php
VirtualDocumentRoot /home/%2/mycode/%1/

<Directory "/home/*/mycode/">
AllowOverride All
Options +Indexes +Includes +FollowSymlinks +ExecCGI
</Directory>

</VirtualHost>

The above code will use the directory name plus the user’s username, for example, fizzbuzz.marcus.myhost.com.

What this means is that you don’t need to create a new virtual host for each one of your projects, which may save you a little time.

For me, a handy bit of functionality I needed for my Idno powered personal lifestream site, is the ability to make posts via email.

Idno has a powerful mobile view, but sometimes even that is too bandwidth intensive, and quite often I like to be able to fire and forget; use the native apps on my phone or laptop that better handle disconnection.

So, I put together a quick plugin that allows you to make posts via email!

How it works

The plugin, once installed and configured, will let you generate a secret email address to which you send your email.

Out of the box the plugin will allow you to make status updates, long form posts (where the length of the subject and message body exceeds 140 characters), and even upload photos, and you can extend it further in your own plugins!

Installation

Installation requires you to have access to your own mail server (which if you’re a good indieweb / prism-breaking citizen you should be). You create an email alias that will pipe the email through a incoming email script, and then configure your email server to direct email to this handler for your domain.

The repository readme has some more detailed instruction (and of course there are many other techniques for firing email through the script).

» Visit the project on Github…

opengraphlogo Open Graph is a technology that provides information about a website or a website object. Among other things, this is how Facebook and G+ gets details about the youtube video that you just posted.

Support for this was missing from base Idno, and since I wanted it for my other site, I wrote a quick plugin.

This plugin provides open graph headers for your idno site, and detailed descriptions for individual permalinks, but it also provides functionality to extract open graph details from other sites when you post links. This means that you’ll get some extra details displayed about a site when you post a link to it.

Hopefully this’ll be useful to you!

» Visit the project on Github…