Craig Francis


BIND Setup

Each website I build, has a name in the form of "client.project", which maps to domain name like:

http://client.project.server.domain.com

Instead of having a configuration file for every project, I have setup a DNS server (BIND), to create all of the sub-domains automatically. Which, along with my Apache configuration, means that new projects can be started simply by making a folder.

Also, because of the DNS naming convention above, it extends to having multiple servers... for example, not only is there a 'demo' server, for the client, but I have my desktop and laptop:

http://client.project.demo.domain.com
http://client.project.gemma.domain.com (desktop)
http://client.project.emma.domain.com (laptop)

As my laptop isn't always being used on the same network as my desktop, it runs its own DNS server locally... whereas the desktop can use a central DNS server for all machines on the network.

In addition to this, my laptop (emma) is running Parallels. This allows for the DNS to run on the 'host-only' virtual network (192.168.2.2). This means that no matter which network I'm connected to, the laptop always has a static IP address that it, and the virtual machines, can use.

If you are going to be using the same setup as my laptop, then I would suggest starting with the Parallels setup.

To use this setup, you can either create it manually, or use the form below to download an automatically created configuration.

Download Configuration

Notes

Installation

When you have downloaded the zip, and extracted it to your specified path, just run:

sudo /path/to/folder/install.sh

Debugging

If this setup does not work, then please follow the debug instructions.

Any feedback would be greatly appreciated, I don't include comments due to the admin time required, but if you email me, I will reply and make appropriate updates. Also, if you would like to take a copy of this article, please read the terms this article is released under. This article was originally written Sunday 17th June 2007 and was updated on Friday 14th September 2007.