Wednesday, March 10, 2010
   
Text Size
UK English

Sponsored Links

The Holy Grail of local web development servers

Welcome to my site! Please subscribe to the RSS feed to be instantly notified of my new posts

Powered by "What would Seth Godin do?" for Joomla!
Article Index
The Holy Grail of local web development servers
Basic BIND configuration
Configuring your DNS zone
Setting up Apache
Where to go from there
All Pages

If you are a serious web developer, you might have already figured out that performing experiments and untested upgrades on production servers is a disaster waiting to happen, bringing down the live site with them. Staging live servers (in the form of dev.example.com) usually don't cut it either, especially if you have a lot of file transferring or editing to do. However, local development is still a kludge, as you have to develop in a sub-directory, something like http://localhost/mysite. This has all sorts of implications, the most evident of which being that it breaks cross-content links if you try to pack it and deploy it back to the live site.

Ideally, you would need to develop in subdomains, something like http://mysite.localhost, which would mean that you have the flexibility of local development with the peace of mind of not having to develop in a sub-directory. But, face it. Setting up subdomains is an involving process, requiring hacking around your Apache configuration files. This is suboptimal if you want to do it regularly. Unless you come up with a way to turn http://mysite.localhost to automatically understand where it should find its files.

This article will explain you how to combine WampServer and BIND to create this kind of Holy Grail local web development server on Windows. You will configure a single DNS entry and a single virtual host in order to create a server which can handle infinite subdomains! The only pre-requisite is having a fixed IP address for your server. Well, even 127.0.0.1 will do if you can't do anything better than that!

 

Setting up BIND

BIND is the reference implementation of a DNS server. We need DNS in order to resolve our subdomains into IP addresses for our system to work. As a bonus, we also get active DNS caching which will speed up our web browsing. Talking about killing two birds with one stone!

You can download BIND for Windows as a ZIP archive from ISC. The Windows download appears on the right column, in the "immediate download" box. Unzip this archive on a local folder and double click on BINDInstall.exe. In the installation window, change only the following options:

  • Target directory: c:\named
  • Service account name: named
  • Service account password: enter a password you will remember
  • Confirm service account password: same as above
  • Automatic startup: check
  • Keep config files after uninstall: check

Click on Install. After a while it says that "BIND installation completed successfully". Click on OK, then Exit to close the installer.

Right now you have a non working BIND server. The next steps will make sure that we get to a point where we can get this to work for us. Important note: This tutorial assumes that your server's IP address is 192.168.1.6 and your development domain is local.web. If your setup differs, you'll have to adjust the configuration files accordingly.Let's begin the customization.

 



Welcome to my site! Please subscribe to the RSS feed to be instantly notified of my new posts

Powered by "What would Seth Godin do?" for Joomla!

JoomlaPack News

JoomlaPack Blog

Advanced Search

Statistics

Members : 4
Content : 48
Content View Hits : 85548