Back our Angular 4 Book on Kickstarter.

Why doesn't Flex Remoting work with ColdFusion 10 and Apache Web Server?

I'm doing some maintenance on an AIR application with a ColdFusion backend. For testing purposes, I installed a brand new copy of ColdFusion 10 and Apache Web Server 2.2.

My first step was to test this new setup the Flex Remoting connection between ColdFusion and Flex. It was borked! The flex2remoting URL would return a 404. What was wrong? I do not remember having problems in the past. ColdFusion 10 introduced a new version of Flex Remoting, so maybe that was somehow the cause. There are a few people complaining about errors they've encountered. I tried all the fixes.

First, I tried tweaking ColdFusion's file, as described by my good friend Joseph. That didn't work for me. I found another suggestion which recommended commenting out some lines of ColdFusion's web.xml file. No luck there either. I went over all of ColdFusion's Flex Remoting Configs in an attempt to find something amiss, no luck.

I started grasping at straws and experimenting. I know that in IIS, there is a virtual directory called Jakarta which is a Java Mapping and helps Flex Remoting, among other things run. Does Apache have something similar and could the setup be wrong? Apparently the answer is yes! Open up the mod_jk.conf file. It was created when you used the ColdFusion Web Server Configuration Tool to configure the Apache web server. There are a bunch of 'jk' properties:

LoadModule jk_module "C:\ColdFusion10\config\wsconfig\1\"
JkWorkersFile "C:\ColdFusion10\config\wsconfig\1\"
JkMountFile "C:\ColdFusion10\config\wsconfig\1\"

As best I can tell this is the Apache equivalent of the Jakarta mapping in IIS. I started researching the different options around the module loading.

When using virtual hosts with Apache Web Server, the mappings do not trickle down. I added this command to my Apache config:

JkMountCopy All

And everything started working magically.

There are reports of similar problems with CF11. It is frustrating that problems like this still exist.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
All Content Copyright 2005, 2006, 2007, 2008, 2009 Jeffry Houser. May not be reused without permission
BlogCFC was created by Raymond Camden. This blog is running version