Recently, as part of my work on a ColdFusion project, I needed to upgrade my “Development Machine” (aka laptop) from ColdFusion 8 to ColdFusion 9 for testing purposes. However, I also needed to keep CF8 around for current use.
My goal was to set up my laptop in such a way, that when all of the appropriate servers were running, I could simply type:
- http://cf8/
- http://cf9/
to access the same files (and therefore application). Thus, no CFIDE can be in the document root itself! This way, I wouldn’t have to think of which server I was running at the time, and I wouldn’t have to keep two different folders in sync.
The other requirement was for things to work smoothly with my WAMP server, since that’s what I have for working on PHP projects, and to run a MySQL server for both CF and PHP applications.
Please note that this is going from memory and some OneNote notes that I took. Don’t kill me if I got the names wrong!
Google is your friend
As with all these kinds of projects, Google is your friend. The following links that I found were very helpful in working things out the way I would like them:
- For basic CF server installation instructions: http://www.barthle.com/blog/post.cfm/what-i-learned-today-how-to-run-cf7-cf8-and-cf9-at-the-same-time
- For general help with VirtualHost directives: http://www.boyzoid.com/blog/index.cfm/2007/6/13/Running-CF8–CF-7-on-JRun-with-Apache
- For specific help with VirtualHost directives: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:60601
- To get Windows to recognize various host names properly: http://www.sepago.de/d/helge/2009/06/04/where-is-the-hosts-file-on-windows-x64
- ColdFusion documentation:
I didn’t follow them in that order, but I figured that I would dump them here.
Procedure Outline
Now that we have sources out of the way, I’ll run you through the general steps, and you can go back through the links that I showed to figure out the details.
The basic way of using several CF servers and once is to install them as applications in the JRun Server structure. That means that instead of having your base folder for everything be the (default) “ColdFusion” folder, it would be “JRun” and the servers are housed in the “/servers” folder under that. So, if you installed ColdFusion as a standalone server at first, then uninstall it before you get started! Try to remember any and all settings that you made first though.
For now, don’t have Apache running. Once you’re all ready:
- Install ColdFusion 9 in a multiserver configuration. Installing CF9 first simply means that you will have the latest JRun server running, and should be backwards compatible for your CF8 server.
- Make sure to select EAR for the CF9 server package. This should go along with the multiserver option chosen above. These two steps essentially install JRun, and then create a package for CF9 that can be installed on the JRun server. Set the context root to “/”!
- Create an EAR file for CF8 by running the installer. If step 1 completed successfully, then you should be automatically directed (in fact required, I believe) to choose the multiserver option for this install as well. This time, however, the installer won’t go through the JRun install, and simply create the EAR file. Set the context root to “/”!
- For each of CF9 and CF8, install and test the servers on JRun. This isn’t actually all that hard. If you follow the ColdFusion documentation above, you should be able to expand both EAR files.
- I suggest expanding the EAR files into {JRun}/servers/ directly.
- After you’ve done so, fire up JRun, go to the admin section (usually something like http://localhost:8000). If the JRun auto-configuration doesn’t run, create a new server with the same name as the name of the directory you created when expanding EAR files.
- Once you have created it, you should see something like:

- Go to http://localhost:8301/CFIDE (or whatever the “Web Server Port Number” was), and make sure that the final auto-configuration for the CF server itself works.
- Edit the Windows hosts file. I’m not completely sure this is necessary, but I did it, and things work, so at least it doesn’t break anything. Follow link #4 above to find your hosts file, and make sure you have Admin permissions when you edit the file. Add the names of your new dev ‘servers’ that you want (I named mine ‘cf8’ and ‘cf9’).
- Connect Apache to the JRun server. The instructions in the 2nd link above (boyzoid.net) should work. My VirtualHost directive looks like (with folder names taken out):
<VirtualHost *:80> JRunConfig Apialloc false JRunConfig Serverstore "{JRun}/lib/wsconfig/cf8/jrunserver.store" JRunConfig Bootstrap 127.0.0.1:51000 Alias /CFIDE/ "{JRun}/servers/cf8/cfusion-ear/cfusion-war/CFIDE/" DocumentRoot "{wamp}/www/" ServerName cf8 <Directory "{JRun}/servers/cf8/cfusion-ear/cfusion-war/CFIDE/" > Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> ErrorLog "{wamp}/logs/cf8-error.log" CustomLog "{wamp}/logs/cf8-access.log" common </VirtualHost>Use the links listed if you have any problems with your VirtualHosts directive.
- Fire up Apache. Try going to your named server (http://cf9/) to make sure it works, and check that you can connect to your CFIDE folder.