JavaScript appears to be disabled. We recommend you enable JavaScript while visiting this site.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Installing Apache 2.0.59 to a Windows-based computer, locally: Part 4

In the previous three parts of this guide, we setup Apache 2.0.59 and then created the necessary connections to use ActivePerl, mod_perl, ColdFusion MX 6.1, ColdFusion MX 7.0.2, PHP 4.4.2, PHP 5.1.4, MySQL 4.1.18, and PostgreSQL 8.1.3. This time, we're going to bring everything together by creating a number of batch files to fairly easily switch between various Web server setups.

What is a batch file?

A batch file is basically a way to run a number of Windows prompts at once. In this particular case, we'll be using it to stop the Web server, copy, rename, and delete, files, and then start the necessary services up once again.

While we could do this manually, having just one, correctly setup, file to run is much easier, and much more logical.

Assumptions

I'm going to assume that;

  1. Your Web root folder is c:\home\.
  2. If you installed PHP, you placed the php.ini file in the c:\windows\ folder.
  3. If you installed Apache 1.3.x, you installed it to C:\Program Files\Apache Group\Apache\
  4. If you installed Apache 2.0.x, you installed it to C:\Program Files\Apache Group\Apache2\
  5. If you installed PHP, you have one working httpd.conf file for each version of PHP you installed, times each version of Apache you have installed. So, if you have two versions of PHP and one version of Apache, you should have two httpd.conf files. One for Apache with PHP 4, one for Apache with PHP 5.
  6. If you installed PHP, you have one working php.ini file for each version of PHP you installed.
  7. If you installed ColdFusion MX, you have one working httpd.conf file for each version of ColdFusion MX you installed, times each version of PHP you installed, times each version of Apache you installed, plus the number of ColdFusion MX versions you installed. So, if you installed two version of ColdFusion MX, one version of PHP, and one version of PHP, that's [(2 * 1 * 1) + 2]
  8. Each of these httpd.conf files is in c:\home\configuration\. Likewise, each php.ini file necessary is in this same folder. There is also a blank text file called zblank.txt in this folder.

Creating the necessary batch files

I'm going to go through a batch file nice and slow, working through each line. This batch file will stop Apache 1.3.x. It will then prepare Apache 1.3.x to run PHP 4. We'll then create a text file that tells us that Apache 1.3.x, running PHP 4, is started.

First, the batch file.

net stop "ColdFusion MX Application Server"
net stop "ColdFusion MX 7 Application Server"
net stop "Apache"
net stop "Apache2"
DEL "c:\home\zApache1.3_CFMX6.1_PHP4 is ready.txt"
DEL "c:\home\zApache1.3_CFMX7.0_PHP4 is ready.txt"
DEL "c:\home\zApache1.3_CFMX6.1_PHP5 is ready.txt"
DEL "c:\home\zApache1.3_CFMX7.0_PHP5 is ready.txt"
DEL "c:\home\zApache2.0_CFMX6.1_PHP4 is ready.txt"
DEL "c:\home\zApache2.0_CFMX7.0_PHP4 is ready.txt"
DEL "c:\home\zApache2.0_CFMX6.1_PHP5 is ready.txt"
DEL "c:\home\zApache2.0_CFMX7.0_PHP5 is ready.txt"
DEL "c:\home\zApache1.3_PHP4 is ready.txt"
DEL "c:\home\zApache1.3_PHP5 is ready.txt"
DEL "c:\home\zApache2.0_PHP4 is ready.txt"
DEL "c:\home\zApache2.0_PHP5 is ready.txt"
COPY "C:\Program Files\Apache Group\Apache\conf\httpd.conf" "C:\Program Files\Apache Group\Apache\conf\httpd_backup.conf"
COPY "c:\home\configuration\httpd_Apache1.3_PHP4.conf" "C:\Program Files\Apache Group\Apache\conf\httpd.conf"
COPY "C:\windows\php.ini" "c:\windows\php_backup.ini"
COPY "C:\home\configuration\php_Apache_PHP4.ini" "c:\windows\php.ini"
net start "Apache"
COPY "C:\home\configuration\zblank.txt" "C:\home\zApache1.3_PHP4 is ready.txt"

Start Notepad, and we'll walk through this beast of a batch file.

net stop "ColdFusion MX Application Server"
net stop "ColdFusion MX 7 Application Server"
net stop "Apache"
net stop "Apache2"

These four lines stop ColdFusion MX 6.1, ColdFusion MX 7, Apache 1.3.x, and Apache 2.0.x (in order). Of course, if you have not installed one of these, you can simply remove those lines. However, if you have installed any of these, you should keep these lines in place. After all, you never know what services may be running.

DEL "c:\home\zApache1.3_CFMX6.1_PHP4 is ready.txt"
DEL "c:\home\zApache1.3_CFMX7.0_PHP4 is ready.txt"
DEL "c:\home\zApache1.3_CFMX6.1_PHP5 is ready.txt"
DEL "c:\home\zApache1.3_CFMX7.0_PHP5 is ready.txt"
DEL "c:\home\zApache2.0_CFMX6.1_PHP4 is ready.txt"
DEL "c:\home\zApache2.0_CFMX7.0_PHP4 is ready.txt"
DEL "c:\home\zApache2.0_CFMX6.1_PHP5 is ready.txt"
DEL "c:\home\zApache2.0_CFMX7.0_PHP5 is ready.txt"
DEL "c:\home\zApache1.3_PHP4 is ready.txt"
DEL "c:\home\zApache1.3_PHP5 is ready.txt"
DEL "c:\home\zApache2.0_PHP4 is ready.txt"
DEL "c:\home\zApache2.0_PHP5 is ready.txt"

These lines delete the file referenced. In this case, we're deleting every possible text file that could exist. As before, if you have not installed one of the versions of Apache, or one of the versions of PHP, or one of the versions of ColdFusion MX, you can remove those lines.

COPY "C:\Program Files\Apache Group\Apache\conf\httpd.conf" "C:\Program Files\Apache Group\Apache\conf\httpd_backup.conf"

First, we create a backup of the httpd.conf file for Apache 1.3.x.

COPY "c:\home\configuration\httpd_Apache1.3_PHP4.conf" "C:\Program Files\Apache Group\Apache\conf\httpd.conf"

Second, we make a copy of the working httpd.conf file that runs Apache 1.3.x with PHP 4.

COPY "C:\windows\php.ini" "c:\windows\php_backup.ini"
COPY "C:\home\configuration\php_Apache_PHP4.ini" "c:\windows\php.ini"

As with the httpd.conf file, we create a backup of the php.ini file, and then copy a working PHP 4 file into the correct directory.

net start "Apache"

Next, we start the Apache 1.3.x service.

COPY "C:\home\configuration\zblank.txt" "C:\home\zApache1.3_PHP4 is ready.txt"

Finally, we copy the blank text file and rename the copy so that we know which configuration is running.

Save the Notepad file as Apache1.3_PHP4.bat where ever makes the most sense to you. I put it in the configuration folder, but you could also put it in the c:\home\ folder, or another folder entirely (or on your Desktop).

Moving forward

I've created twelve (12) batch files in a matter similar to the above, and zipped them up for download. Feel free to modify them as necessary, for your own use.

Keep in mind that these are very basic batch files. It's possible to clean these up significantly, with the full range of commands at your disposal. For now, however, this will get you going.

Download bat_20060826.zip for the twelve batch files. Feel free to modify as necessary to get them to work on your own system.

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

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Installing Apache 2.0.59 to a Windows-based computer, locally: Part 3

In Part 1 of this Apache 2.0.59 guide, we setup Apache 2.0.59 on a Windows XP SP2 machine. We also setup Perl and mod_perl, attempting to mimic our Apache 1.3.34 install. In Part 2 of this Apache 2.0.59 guide, we setup ColdFusion MX 6.1 and 7.0. This time, we'll be continuing in our quest by adding support for both PHP 4 and PHP 5.

In previous guides, we installed PHP 4 and PHP 5, so if you need to install either one, do so with the above directions. If you'll be installing PHP 4 and PHP 5 for the first time, and have not installed on Apache 1.3.x already, then you may be able to pick and choose from these guides to get the information you need.

Before we do this, however, we need to think about just what we're doing.

Up until this point, you may have installed any (or none) of the below. (Keep in mind that you can generalize these if you have slightly newer versions. So, PHP 5.1.4 = PHP 5.x.)

  • Apache 1.3.34
  • Apache 2.0.59
  • PHP 4.4.2
  • PHP 5.1.4
  • ColdFusion MX 6.1
  • ColdFusion MX 7.0.2

This gives us a number of options on what our local Web server could be running at one time. For example, we could be running PHP 4, ColdFusion MX 6.1, and Apache 1.3.x or Apache 2.0.x. Likewise, we could use PHP 4 or PHP 5, or ColdFusion MX 6.1 or ColdFusion MX 7.0. Writing out a list of all of our possible combinations, we've got something like the following.

  1. Apache1.3_CF6.1_PHP4
  2. Apache1.3_CF7.0_PHP4
  3. Apache1.3_CF6.1_PHP5
  4. Apache1.3_CF7.0_PHP5
  5. Apache2.0_CF6.1_PHP4
  6. Apache2.0_CF7.0_PHP4
  7. Apache2.0_CF6.1_PHP5
  8. Apache2.0_CF7.0_PHP5

Of course, we could also run our local server without the ColdFusion MX component, or PHP component at all. For ease, however, we'll just stick with one of the above possibilities. What this means is that for each of the above that you want to run, you'll need to have an httpd.conf file.

If you followed my above guides, than you should already have the Apache 1.3.x configuration files (although with slightly different names). Once we have all eight configurations, we can write batch files to automate most of the process. For getting these up and running. With one click (and maybe just a little renaming), we can have the Web server that we want up and running.

Whatever you may have for Apache 1.3.x, I recommend you create a 'configuration' folder in your DocumentRoot directory (so, c:\home\configuration\ if you've been following along) where you can begin compiling httpd.conf files.

For example, I've obviously followed by own guides, so I have four files thus far.

  • httpd_Apache1.3_CFMX6.1_PHP4.conf
  • httpd_Apache1.3_CFMX6.1_PHP5.conf
  • httpd_Apache1.3_CFMX7.0_PHP4.conf
  • httpd_Apache1.3_CFMX7.0_PHP5.conf

We should also have either one or two php.ini files – one for PHP 4 and one for PHP 5 – that we'll also want to put copies of in this folder.

  • php_Apache_PHP4.ini
  • php_Apache_PHP5.ini

Apache 1.3.x and Apache 2.0.x use the same php.ini files. So, it's not necessary to make one copy each for Apache 1.3.x and one each for 2.0.x.

This done, we can begin connecting to PHP 4 and PHP 5 on Apache 2.0.x.

Hooking up PHP 4.4.2

In a previous guide, we installed PHP 4.4.2 and in yet a later guide moved our installation to the c:\php4\ folder.

Since we've already got PHP 4 working on Apache 1.3.x, most of our setup is already complete. Now it's just a matter of hooking up Apache 2.0.x to recognize it.

First, we'll need to make sure we've got a backup of the httpd.conf file in the C:\Program Files\Apache Group\Apache2\conf folder.

Now open the Apache 2 httpd.conf file. Do a search for LoadModule, and at the end of this section, add the following line. Keep in mind that if you installed PHP 4 to a different folder, you should make that change here as well.

LoadModule php4_module "c:/php4/php4apache2.dll"

Now, do a search for AddType. After the first uncommented line (AddType application/x-gzip .gz .tgz), place the following.

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Finally, add 'index.php' to the DirectoryIndex line, where ever you'd like it be called in the order of things. Depending upon preference, you may also want to add index.htm, since Apache 2.0.x doesn't seem to want to include these.

Save httpd.conf. Now go to the c:\php4\ directory (or where you installed PHP 4) and copy the php4apache2.dll from the sapi folder into the root PHP folder. So, from c:\php4\sapi\ to c:\php4\.

For php.ini, everything should be setup correctly. However, you'll want to verify that the right php.ini file is in place.

Now start Apache2 from the Services panel (or the Apache Services Monitor) and you should find that the description lists PHP 4. If you go to http://localhost/phpinfo.php (if you created this file), you should also find that PHP is up and running.

Make sure both your ColdFusion MX 6.1 and ColdFusion MX 7.0 httpd.conf files have the httpd.conf changes made, and you can switch between either version.

Connecting to PHP 5

Assuming you've already setup PHP 4 for Apache 2.0.x, using the instructions above, moving to PHP 5 is extremely easy. So easy, in fact, that it's scary. Make a copy of any httpd.conf files you may have for PHP 4. For example, the two I have in C:\Program Files\Apache Group\Apache2\conf\ are called httpd_CFMX6.1_PHP4.conf and httpd_CFMX7.0_PHP4.conf.

I'll copy both of these and rename them to httpd_CFMX6.1_PHP5.conf and httpd_CFMX7.0_PHP5.conf. That done open both up and do a search for php4, one file at a time. You'll find php4 three times, in the following line.

LoadModule php4_module "c:/php4/php4apache2.dll"

Which you'll simply change to three '5's.

LoadModule php5_module "c:/php5/php5apache2.dll"

Now save the httpd.conf files. The php5apache2.dll file will already be in this location, so you should be set to go. Make a copy of either one of these, make sure that you're using the right php.ini file, restart Apache2, and verify that phpinfo() gives the correct information.

Wasn't that easy?

Now that PHP 4 and/or PHP 5 are installed ...

Now that we've setup PHP 4 and/or PHP 5 with Apache 2.0.x, it's time to backup the necessary .conf files into our 'configuration' folder.

At this point, you'll have up to ten files in this folder (c:\home\configuration\). Up to eight .conf files and up to two .ini files. I've listed all ten possibilities below.

  • httpd_Apache1.3_CFMX6.1_PHP4.conf
  • httpd_Apache1.3_CFMX6.1_PHP5.conf
  • httpd_Apache1.3_CFMX7.0_PHP4.conf
  • httpd_Apache1.3_CFMX7.0_PHP5.conf
  • httpd_Apache2.0_CFMX6.1_PHP4.conf
  • httpd_Apache2.0_CFMX6.1_PHP5.conf
  • httpd_Apache2.0_CFMX7.0_PHP4.conf
  • httpd_Apache2.0_CFMX7.0_PHP5.conf
  • php_Apache_PHP4.ini
  • php_Apache_PHP5.ini

Now, let's create a blank text file called zblank.txt. Next, we should determine whether we want to have a version that does not run ColdFusion MX. If you want to, read the next section. Otherwise, skip the next section and read the following one.

Removing ColdFusion MX from our configurations

To remove ColdFusion MX, you'll need four more httpd.conf files. Two for Apache 1.3.x and two for Apache 2.0.x, as each has two versions of PHP. Since it doesn't matter which one we take from, just copy the four httpd.conf files that reference CFMX6.1 in their file names.

Now, simply remove the 'Copy of ' and 'CFMXx.y' from the four file names. You'll end up with the following.

  • httpd_Apache1.3_PHP4.conf
  • httpd_Apache1.3_PHP5.conf
  • httpd_Apache2.0_PHP4.conf
  • httpd_Apache2.0_PHP5.conf

There's just a couple of things to remove from each of these conf files. The following block will need to be removed from the Apache 1.3.x files.

# JRun Settings
LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/1/mod_jrun.so"
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/CFusionMX/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51010
#JRunConfig Errorurl <optionally redirect to this URL on errors>
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
</IfModule>

And this block will need to be removed from the Apache 2.0.x files.

# JRun Settings
LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/2/mod_jrun20.so"
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/CFusionMX/runtime/lib/wsconfig/2/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51010
#JRunConfig Errorurl <optionally redirect to this URL on errors>
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
</IfModule>

Finally, make sure 'index.cfm index.cfml' is removed from the DirectoryIndex lines in each file.

By allowing our Apache 2.0.x server, and Apache 1.3.x server, to run without checking for ColdFusion MX, we can keep it running quick, even if we decide not to start any versions of ColdFusion MX.

The only thing we have left is hooking up MySQL and PostgreSQL and creating batch files to use these httpd.conf and php.ini files to get the server we want up and running.

So, let the hardest part begin.

Connecting to MySQL and PostgreSQL

Amazingly enough, as long as you already setup MySQL and PostgreSQL for Apache 1.3.x, you're all set to begin using MySQL and PostgreSQL for both ColdFusion MX 6.1, ColdFusion MX 7.0, PHP 4, and PHP 5. This is because ColdFusion MX is handling the SQL requests via the datasources, and PHP is likewise handling it's own requests (via the php.ini file).

Feel free to test this using the PHP files I detailed before (check MySQL connection in PHP | check PostgreSQL connection in PHP) or just using the ColdFusion MX Administrator to check all datasources.

Coming in Part 4 ...

In Part 4, I'll be going over how to create the batch files that we'll need to work with the httpd.conf and php.ini files that we've created. While I could detail it here, better to just put it in it's own article/post, as that makes things much easier (if not for you, then at least for me ;)).

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

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Installing Apache 2.0.59 to a Windows-based computer, locally: Part 2

In Part 1 of this Apache 2.0.59 guide, we setup Apache 2.0.59 on a Windows XP SP2 machine. We also setup Perl and mod_perl, attempting to mimic our Apache 1.3.34 install. This time, we'll be continuing in our quest by installing ColdFusion MX 6.1 and 7.

Assumptions

First, I assume that you've already installed ColdFusion MX. Of course, you may not have installed 6.1 and 7, but I'm going to assume you've installed at least one. If you've installed neither, then you may want to check out my guides on ColdFusion MX 6.1 and/or ColdFusion MX 7.

Since you'll be making modifications to the httpd.conf file for Apache 2.0.x, you'll also want to back this file up.

It's also important to determine how many installations of ColdFusion MX you'll be doing. You'll need to know this to determine whether or not you'll need to switch between one version of ColdFusion and another. I'm going to assume that you'll be enabling both, so feel free to skip whatever steps as necessary below.

Keep in mind that if you're just going to install ColdFusion MX, then the steps below will not be necessary. This is only if you've already installed ColdFusion MX for Apache 1.3.x.

Hooking up ColdFusion MX 6.1

Start by creating a backup copy of the httpd.conf.

When ColdFusion MX 6.1 is installed, it inserts the following lines into the httpd.conf file.

# JRun Settings
LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/1/mod_jrun.so"
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/CFusionMX/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51010
#JRunConfig Errorurl <optionally redirect to this URL on errors>
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
</IfModule>

Unfortunately, Apache 2.0.x requires a different mod_jrun.so file altogether. This means that we'll need to get a copy of this file, and point our httpd.conf file to it.

What we're first going to do is copy this text into the Apache 2.0.x httpd.conf file. On Apache 1.3.x, ColdFusion MX adds this after the BrowserMatch content, so we'll do a search for BrowserMatch, from the bottom of the file, and add the above lines after the following line.

BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

There's some modifications that we'll need to make. As you can see below, I've pointed to the /2/ folder, and mod_jrun20.so file (which doesn't yet exist).

# JRun Settings
LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/2/mod_jrun20.so"
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/CFusionMX/runtime/lib/wsconfig/2/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51010
#JRunConfig Errorurl <optionally redirect to this URL on errors>
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
</IfModule>

Now save httpd.conf. Next, head over to the C:\CFusionMX\runtime\lib\wsconfig\ folder. Within this folder there will be a '1' folder, and three files (jrunwin32.dll, wsconfig.log, and wsconfig.properties).

First, create a copy of the '1' folder and call the copy '2'. Next, make a backup copy of the wsconfig.properties file, and open the original in Notepad.

This file currently contains the following information.

#JRun/ColdFusion MX Web Server Configuration File
#Thu Feb 23 19:08:04 GMT-06:00 2006
1=Apache,C:/Program Files/Apache Group/Apache/conf,"",C:\\Program Files\\Apache Group\\Apache\\Apache.exe,""
1.srv=localhost,"default"
1.cfmx=true,<null>

What we're going to do is copy the last three lines (they all start with '1') to the end of the this file. We're then going to enter a bunch of '2's so that we have the following in this file.

#JRun/ColdFusion MX Web Server Configuration File
#Thu Feb 23 19:08:04 GMT-06:00 2006
1=Apache,C:/Program Files/Apache Group/Apache/conf,"",C:\\Program Files\\Apache Group\\Apache\\Apache.exe,""
1.srv=localhost,"default"
1.cfmx=true,<null>
2=Apache,C:/Program Files/Apache Group/Apache2/conf,"",C:\\Program Files\\Apache Group\\Apache2\\Apache.exe,""
2.srv=localhost,"default"
2.cfmx=true,<null>

Save and close wsconfig.properties. Now open the '2' folder. There's a mod_jrun.so file here, but as I said earlier, this won't work with Apache 2.0.x. So, we'll need to get the mod_jrun20.so file for Apache 2.0.x. You can get this file by installing ColdFusion and selecting Apache 2.0.x as the server. Since it's not particularly helpful in this case, I did so on another box, and have attached a zip file containing this file here (mod_jrun20.zip).

Save all necessary files and start the Apache2 service (either through the Services panel or through the Apache Services Monitor). Apache 2 should start, and you should be able to access the ColdFusion MX 6.1 Administrator Login.

Now, make a backup copy of the httpd.conf file and call it something like httpd_CFMX6.1.conf. With that, you're ready to either hook-up ColdFusion MX 7, or begin working on ColdFusion on Apache 2.0.x.

Hooking up ColdFusion MX 7.0.2

Start by creating a backup copy of the httpd.conf. If you went through the above steps, then you'll want to grab the pre-ColdFusion MX 6.1 httpd.conf backup file. Otherwise, you can just change the lines that we added above.

When ColdFusion MX 7 is installed, it inserts the following lines into the httpd.conf file.

# JRun Settings
LoadModule jrun_module "C:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun.so"
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51011
#JRunConfig Errorurl <optionally redirect to this URL on errors>
#JRunConfig ProxyRetryInterval 600
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>

Unfortunately, Apache 2.0.x requires a different mod_jrun.so file altogether. This means that we'll need to get a copy of this file, and point our httpd.conf file to it.

What we're first going to do is copy this text into the Apache 2.0.x httpd.conf file. On Apache 1.3.x, ColdFusion MX adds this after the BrowserMatch content, so we'll do a search for BrowserMatch, from the bottom of the file, and add the above lines after the following line.

BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

There's some modifications that we'll need to make. As you can see below, I've pointed to the /2/ folder, the mod_jrun20.so file (which doesn't yet exist), and the mod_jrun20.c module.

# JRun Settings
LoadModule jrun_module "C:/CFusionMX7/runtime/lib/wsconfig/2/mod_jrun20.so"
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/CFusionMX7/runtime/lib/wsconfig/2/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51011
#JRunConfig Errorurl <optionally redirect to this URL on errors>
#JRunConfig ProxyRetryInterval 600
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>

Now save httpd.conf. Next, head over to the C:\CFusionMX7\runtime\lib\wsconfig\ folder. Within this folder there will be a '1' folder, and three files (wsconfig.log, and wsconfig.properties).

First, create a copy of the '1' folder and call the copy '2'. Next, make a backup copy of the wsconfig.properties file, and open the original in Notepad.

This file currently contains the following information.

#JRun/ColdFusion MX Web Server Configuration File
#Thu Mar 30 17:54:42 GMT-06:00 2006
1=Apache,C:/Program Files/Apache Group/Apache/conf,"",C:\\Program Files\\Apache Group\\Apache\\Apache.exe,"",false
1.srv=localhost,"coldfusion"
1.cfmx=true,<null>

What we're going to do is copy the last three lines (they all start with '1') to the end of the this file. We're then going to enter a bunch of '2's so that we have the following in this file.

#JRun/ColdFusion MX Web Server Configuration File
#Thu Feb 23 19:08:04 GMT-06:00 2006
1=Apache,C:/Program Files/Apache Group/Apache/conf,"",C:\\Program Files\\Apache Group\\Apache\\Apache.exe,""
1.srv=localhost,"default"
1.cfmx=true,<null>
2=Apache,C:/Program Files/Apache Group/Apache2/conf,"",C:\\Program Files\\Apache Group\\Apache2\\Apache.exe,"",false
2.srv=localhost,"coldfusion"
2.cfmx=true,<null>

Save and close wsconfig.properties. Now open the '2' folder. There's a mod_jrun.so file here, but as I said earlier, this won't work with Apache 2.0.x. So, we'll need to get the mod_jrun20.so file for Apache 2.0.x. You can get this file by installing ColdFusion and selecting Apache 2.0.x as the server. Since it's not particularly helpful in this case, I did so on another box, and have attached a zip file containing this file here (mod_jrun20.zip).

Save all necessary files and make sure that you rename the cfdocs and cfide folders as necessary (that is, you'll need to make sure you have the CFMX 7 folders available to start ColdFusion MX 7). Start the Apache2 service (either through the Services panel or through the Apache Services Monitor). Apache 2 should start, and you should be able to access the ColdFusion MX 7.0 Administrator Login.

Now, make a backup copy of the httpd.conf file and call it something like httpd_CFMX7.0.conf. With that, you're ready to begin working on ColdFusion on Apache 2.0.x.

In the next part ...

In Part 3, we'll go over the PHP 4 and 5 installation. We also still have to connect to MySQL and PostgreSQL (which may end up being Part 4). Until then, have fun in ColdFusion MX on Apache 2!

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