CF 7.02 + Apache 2.2 on Windows XP Pro

Posted on June 22, 2008 at 1:39 AM in General, ColdFusion

Okay, I admit it. I'm a WinDoze guy. I even have the property patch. Well, kinda. When it comes to me being the server administrator, it has to be WinDoze. Sorry boys and girls, but I don't come from a network background, or even a programming background, so I like point-and-click. I'm comfy in that realm. Start talking shells and all of those other "big words" that pertain to *nix, and I'm lost. That said, I am looking to justify the expense for my first MacBook Pro and/or iMac - but we'll save that for another time and post.

Last night I suddenly realized that I *really* needed to either (a) upgrade my development machine to WinDoze Server, (b) purchase some sort of add-on software, or (c) load Apache. Since Apache is free, I opted for (c). Here is a (somewhat) quickie overview of why I needed to make a move, a couple of links that I followed to get it done, and a couple of "gotcha" notes.

Why the move?

Actually, there are two reasons. The first is that for the first time in my development career, I am working in a team environment. As such, I really feel the need to try and have as close to the same environment that my fellow team members have. The second reason is Transfer.

"What on earth does Transfer have to do with it?"

As I'm sure most (if not all) of you know, when running IIS on WinDoze XP Pro, you can only run one "website". So each project is browsed to under the server root:


This can be an annoying thing, but since it's what I have used for many, many years now, I learned a really long time ago how to setup my applications to move (unchanged) from this environment to a production environment where each application has its own "website". And this is where Transfer enters into the equation...

Transfer Decorators are spectacular. They give you all sorts of flexibility and extensibility options. But you have to provide the path to them in your Transfer config file, like so...

  1. <object name="MyObject"
  2. table="tblMy_Table"
  3. decorator="">
  4. <!-- definitions -->
  5. </object>

If running IIS on WinDoze XP, this poses a problem unless your project is in the web root, and unless you only have one project that you're working on, that simply isn't the case. The only options available are to either (a) use a different Transfer config file for production and development, or (b) have a development environment that mimmicks the production one. If you're like me, Option A is really not a viable option.

The Apache Installation

My apologies if you're looking for a step-by-step tutorial on installing Apache on WinDoze XP, because this isn't one. However, I will gladly share with you the guides that I followed in getting my machine up and running.

Between those two guides, I was able to get Apache installed and hooked up to my ColdFusion install. Then it came time for the Apache equivalent to WinDoze Virtual Directories, known as Virtual Hosts.

This is the point where I about came uncorked, and started slinging 4-letter words around like a drunken sailor. However, thanks to Jared Rypka-Hauer's willingness to share his knowledge and expertise with me, and his surprising patience in dealing with my frustration (hey, what can I say, I wasn't very much fun to deal with at the time), this too became an obstacle that was left by the wayside.

Here are the three main secrets to Apache's Virtual Hosts...

1. Find the following two lines in the httpd.conf file (in my install it is located at C:Program FilesApache Software FoundationApache2.2conf)

  1. # Virtual hosts
  2. #Include conf/extra/httpd-vhosts.conf

... and change it to

  1. # Virtual hosts
  2. Include conf/extra/httpd-vhosts.conf

What you've just done is uncommented the Include line, which loads the httpd-vhosts.conf file.

2. Add a VirtualHost block for each project. This is done in the httpd-vhosts.conf file that we set to include in Step 1. On my install, it is located in the C:Program FilesApache Software FoundationApache2.2confextra directory.

  1. <VirtualHost *:80>
  2. ServerAdmin
  3. ServerName projectname
  4. DocumentRoot "D:fullpath
  5. omyproject"
  6. ErrorLog "C:path
  7. ologs{projectname}-apache-error_log"
  8. CustomLog "C:path
  9. ologs{projectname}-apache-access_log" common
  10. DirectoryIndex index.cfm index.html
  11. Options Indexes MultiViews Includes
  12. </VirtualHost>

3. Be sure to allow permissions for the project directory.

  1. <Directory "D:fullpath
  2. omyproject">
  3. Order allow,deny
  4. Allow from all
  5. </Directory>

This all-important step is (to the best of my knowledge) typically required because by default, Apache locks down *everything*. So you have to "unlock" the project directory.

More info: Name -based Virtual Host Guide (Apache docs)

Additional Setup Notes

If you happen to have a setup where you have a centrally-located set of scripts, images, CSS files, or some other non-ColdFusion files, you'll need to create an Apache "mapping" (alias) to them. Find the <IfModule alias_module> block in the httpd.conf file, and add the appropriate Alias(es) as shown in the examples.

That's about it, folks. I now have Apache running on WinDoze XP Pro, hooked into CF 7.02 (JRun config). Hopefully by documenting my pain and frustration here you'll be able to avoid most (if not all) of the same pitfalls.


Major "THANK YOU!" once again to Jared Rypka-Hauer for putting up with me and helping calm me down and get things working.

Oh yeah, before I forget, I have to give an Honorable Mention Award to Mark Mandel for the following:

basically you want Transfer to solve the problem that you're too lazy to setup a decent development env ;) ?

That comment is what made me suck it up and try to install Apache in the first place. (I had asked about dynamic values in the Transfer config file.)

(Comment Moderation is enabled. Your comment will not appear until approved.)

On 6/22/08 at 11:38 PM, Mark Mandel said:

* laughs *

Now I know you're going to quote me, I'll be a lot more careful with what I say ;o)

On 6/23/08 at 12:29 AM, Nolan Erck said:

Last year I made the same switch, for the same reasons, and I love a) using Apache now on my Development boxes and b) my MacBook Pro.

FYI -- check out VM Ware Fusion. It should let you run your Windows software on your MacBook Pro without requiring a dual-boot. I've been running it for about 6 months now, and it's proven to be worth every penny (around $70 US).

hth :)

On 6/23/08 at 11:42 AM, Gerald Guido said:

XAMPP is your friend.

It even has a Apache Tomcat plug in for running CF Enterprise, Railo and OpenBD.

Latest Articles

Eventually something really brilliant and witty will appear right here.


October 2017
« Sep  
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        


Enter a valid email address.

The Obligatory Wish List