Installing ColdFusion MX 7.0.1 on a local Windows-based, Apache, server

Note: For information on updating to ColdFusion MX 7.0.2, see Upgrading our installation of ColdFusion MX 7.0.1 on a local Windows-based, Apache, server.

Update: October 10, 2006 @ 7:11 pm - Thanks to Michael Bryce for his helpful comments regarding this documentation.

In this article, we'll be walking through an installation of ColdFusion MX 7.0.1, Developer's Edition. Since we've already covered the installation of ColdFusion MX 6.1, Developer's Edition, you may already have CFMX 6.1 on your computer, like I did while writing this guide. If you do, that's okay (since I do). Otherwise, your installation will vary slightly.

First, we'll need to download the installer for the Developer's Edition. This can be downloaded from http://www.macromedia.com/software/coldfusion/trial/. The download size is almost 300 MB, so you may have a wait on your hands.

While you're waiting, if you've already installed ColdFusion MX 6.1, you can backup the CFIDE and cfdocs folders in your Web directory. If you've been following along, this would be c:\home\ (or whatever your DocumentRoot has been set to in your Apache httpd.conf file). Put a copy in a new folder called CFMX6.1_docs.

Now, even if you haven't installed CFMX 6.1, make a copy of your httpd.conf file, found in C:\Program Files\Apache Group\Apache\conf, and place it along with your other httpd.conf backups, or in your downloads folder (c:\home\downloads\ if you've been following along). Make a note that this is before the installation of CFMX 7.0.1. For example, httpd_20060319_PreCFMX7.01.conf (where 20060319 is the last date this file was changed).

Also, make sure ColdFusion MX 6.1 is stopped (and that it won't start up when you start your computer). Remember, this is in the Services control panel, and the item you want is the ColdFusion MX Application Server. Change this to Manual, and make sure it's stopped. If you haven't installed ColdFusion MX 6.1 before, then skip this step.

Note, you could just uninstall ColdFusion MX 6.1 as well. Your call, depending upon how much hard drive space you have.

Once your download has completed, start the installer.

Click next, reading as you go, until you're asked where to install ColdFusion MX 7. Keep the default of C:\CFusionMX7\.

Next, if 6.1 is installed, you'll have the ability to either configure Apache to use 7.0.1, or use ColdFusion MX 7.0.1's built-in server to run both 6.1 and 7.0.1. We don't really need both, so let's just “Configure my web server for ColdFusion MX (recommended)”.

Next, you'll need to “Add Web Servers/Sites”. Enter the following information.

Web Server: Apache
Configuration Directory: C:\Program Files\Apache Group\Apache\conf
Directory and file name of server binary: C:\Program Files\Apache Group\Apache\Apache.exe

Select OK, followed by Next.

On the next screen, change the web root to c:\home (or whatever your DocumentRoot has been set to in your Apache httpd.conf file), and select Next. Here, enter an Administrator password twice. On the next, keep RDS enabled, and just use the same password you entered for the Administrator.

Thanks to Mike Bryce for pointing out that there are actually two places you need to enter your Web root directory. The first is for the DocumentRoot, and the next is a dozen lines down in a Directory tag. The following is a snippet from the Apache 1.3.x httpd.conf file, which is very similar to the Apache 2.0.x httpd.conf file (for this particular section). The two important lines are bold.

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/home"

#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "c:/home">

Finally, you'll see that ColdFusion MX 7.0.1 requires 426 MB of space, so go ahead and Install.

Once the installation has completed, go backup the httpd.conf file again (httpd_20060330_PostCFMX7.01.conf was mine). Next, restart Apache, and head over to the ColdFusion Administrator, at http://localhost/CFIDE/administrator/index.cfm.

Type the password that you just created, which will begin the server configuration, which may take a short while.

Since we've already setup some data sources (if you've been following along), we'll need to do some migration. It'll first export your settings, and then import them. Finally, click OK to start the ColdFusion Getting Started Experience.

Note that index.cfm may need to be setup as a directory index. Open the httpd.conf file, search for DirectoryIndex, and add index.cfm and index.cfml to the second instances' line. For example:

DirectoryIndex index.php index.cfm index.cfml index.html index.htm

Restart Apache if you need to add these.

If you've already setup MySQL or PostgreSQL, or both, then you can now run the CFM files that we created early to verify our connections, as well as use the Data Sources area (under Data & Services). If you're testing PostgreSQL, make sure you copy the jar file to the C:\CFusionMX7\lib folder (if you've been following along, something along the lines of postgresql-8.1-405.jdbc3.jar).

And with that, you've successfully setup ColdFusion MX 7.0.1 on an Apache server.

You may want to setup ColdFusion MX 7 Application Server (in Services) to startup manually, instead of automatically.


Note that it's completely possible to now run both ColdFusion MX 6.1 and 7.0.1 on the same instance of Apache, albeit not at the same time. The following is only for advanced users.

You'll remember that we created a copy of the CFIDE and cfdocs folders from ColdFusion MX 6.1. If you now create a copy of these folders for ColdFusion MX 7.0.1, you'll have a copy of each folder for each installation. I also suggested you create a backup of your httpd.conf file both before and after our upgrade. If you do a comparison on the httpd.conf file, using a program like WinMerge, you'll see the exact lines that got changed.

Stop ColdFusion MX 7 Application Server, and Apache. Now, swap (making sure you don't overwrite your copy of the MX 7 files) the httpd.conf file and CFIDE and cfdocs folders from the 7.0.1 installation, to the 6.1 installation. Start Apache, and once it's started, start the ColdFusion Application Server (for 6.1). Hit the Administrator page and you're now running 6.1.

You can switch back to 7.0.1 at any time by stopping the Application Server, Apache, and swapping the two folders and one file.

Keep in mind that if you try to log in to ColdFusion Administrator, but see 'gobbledygook', that probably means that you've got the wrong CFIDE and cfdocs folders for the version you're running. Swap in the correct folders, or change to the other version.

Have fun, and stay safe.

View all of the steps to creating a local Web server, for development.