This is on Windows 7 Home Premium edition.

I have got two ColdFusion 10 (updater 2) instances: "cfusion" (the default one), and "scratch".

I have got a single instance of Apache 2.2 running.

Within Apache, I have set up two virtual hosts, each of which needs to be served by a different ColdFusion instance.

Each of the CF instances serves files fine via Tomcat's internal web server. Apache serves vanilla HTML files fine too. So both CF instances, and both virtual hosts separately work OK.

I can get wsconfig.exe to connect either one of the CF instances to the Apache server, and serve CF files via Apache & that instance.

However I cannot find a way of connecting the second CF instance to Apache as well, so that both CF instances are conected, each serving one of the virtual hosts. WSConfig doesn't seem to understand the notion of "multiple CF instances", and the changes it makes to the httpd.conf (via mod_jk.conf) does not seem to be implemented in such a way as to accommodate multiple CF instances talking to a single Apache instance, or multiple virtual hosts. I freely admit to not being confident enough with how mod_jk (or even really httpd.conf) works to be able to guess if I can change stuff to make it work.

If I try to add the second CF instance using WSConfig, I just get a message "the web server is already configured for ColdFusion". Be that as it may... not the instance of ColdFusion I want to connect it to! If I remove the existing connector to whichever instance is already connected, I can then connect the other one no problems. Not that this helps, but it demonstrates that the CF instance can connect to Apache.

This all used to be fairly straight fwd under older versions of CF and JRun :-(

The only docs I have found are on the "Connect multiple Apache virtual hosts on a web server to a single ColdFusion server" page, but that specifically only deals with a single CF instance. There is no equivalent page for multiple CF instances.

I'm kinda hoping I can move some of the mod_jk config into my virtual host entries in httpd-vhosts.conf (this is how it used to work for JRun), but I've no idea what to put where.

I think I've covered all the necessary info here? If not, sing out and I'll add more. Thanks.

PS: tried to specifically tag this as "ColdFusion-10" as the answer will be different from previous CF versions, but it won't let me cos my rep on this site is too low (odd how it doesn't consider my rep from other S/O sites...). If someone with sufficient rep can add it, that'd be cool: it's probably a valid tag to have. Ta.


a quick way to set this up for development would be to proxy requests for each vhost to the correct coldfusion instance's http port, aka its internal web server.

<VirtualHost *:80>
ServerName server-1.local
ProxyPreserveHost on
DocumentRoot /interwebs/server-1
DirectoryIndex index.cfm
# proxy requests to tomcat on port 8500
ProxyPreserveHost on
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://localhost:8500/$1$2

<VirtualHost *:80>
ServerName server-2.local
DocumentRoot /interwebs/server-2
DirectoryIndex index.cfm
# proxy requests to tomcat on port 8501
ProxyPreserveHost on
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://localhost:8501/$1$2

If you really want to configure apache to use mod_jk which is what i believe the wsconfig does (i haven't ever installed cf10, i'm just going on what i've read) then take a look at http://rob.brooks-bilson.com/index.cfm/2012/2/23/Configuring-Multiple-Instances-of-ColdFusion-10-with-Apache-Virtual-Hosts/

  • Thanks for the thorough answer Chris. I dunno why Rob's blog entry didn't show up when I googled this, but it sounds like the way I will go. I like your suggestion as well though: good lateral thinking! – Adam Cameron Oct 27 '12 at 17:51
  • Link is broken; might be this blog: coldfusion.adobe.com/2016/10/… – Bernhard Döbler Nov 15 '18 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.