My Local Development Setup Part II: The Software

If you recall, I wrote about the hardware I use in my personal development environment. That was just part one of the article though and I'm finally here to finish the job I started way back in January.

One of the primary reasons why I purchased the Mini was for use as a file server. It sat on my desk for about 6 months serving that exact purpose. When I purchased my new Dell, I was determined that I not waste CPU and RAM on that machine for apps which merely ran in the background. Apps like ColdFusion, Apache, MySQL, etc. It was then that I realized with a little research, and some legwork, I could use the Mini as a web server as well. So I downloaded and installed Adobe ColdFusion Developer Edition (my programming language of choice), and MAMP Basic (an all in one package for the Mac which provides a single click install for all of the provided software). So now that the Mini has this software running on it, how do I get my PC to see it? It was fairly straightforward, here's the steps I took.

  1. On the Mini I decided to put all of my sites in the default user folder "Sites". Makes sense, no?
  2. Also on the Mini I created a vhost entry for my sites directory, like so:
    <VirtualHost *:80>
    ServerName local
    DocumentRoot /Users/andymatthews/Sites

This allows me, from the PC, to hit http://local and have it bring up my top level web root. I find that this makes it easier for me to get to sites quickly. For sites that are a little more robust, or sites that need special root level mappings I take it a step further and add a custom vhost on a site by site basis. That vhost looks like this:

<VirtualHost *:80>
DocumentRoot /Users/andymatthews/Sites/personal/

The benefits of this approach are that I can use root level mappings for sites, referencing images, css, scripts, etc. as /.

Finally, I have the hosts file on my PC configured like so:

# Personal development       local

That's pretty much the setup. Shameful that it took me this write the second part of a 2 part series. If you've got questions, or suggestions please make sure to post them in the comments.