Running Railo and ColdFusion 10 side by side with BonCode

ColdFusion , Railo Add comments

The advantage of the BonCode connector for me  is that is does away with the need of having ISAPI filters and the jakarta vDir, which is required when using the native tomcat connector.
The problem with the regular connector is that you cannot enable CF on a site simply  via the web.config file, you have to into IIS and do some work, or use ColdFusion's "web server config tool".
As I want to offer ColdFusion 10 on cfmldeveloper.com I need a way for users to be able to enable CF or Railo themselves without having to contact me, the best way to do this currently is with BonCode.

The current Railo installer now includes the BonCode connector as default, so that is covered, but ColdFusion 10 uses the regular connector and still has the above issues, so what if you want to run Railo and ColdFusion together on the same server using BonCode? Well with a bit of help from Bilal (the creator of Boncode) I managed to get this working.

 

Firstly install Railo as normal but DO NOT install the IIS connector, choose NO for that option.

Now open C:\railo\AJP13 and rename installer.settings to something else so that it is not used, if you know what you are doing with this file then feel free to use it instead, see the docs HERE.

Now run the connector_setup.exe and follow the steps, enabling any options you require, again refer to the docs for more details. For this article I am using only the default settings.

image

port 8009 is the Tomcat port that Railo uses, for ColdFusion you would use 8012

image

Make sure you choose "let me choose specific sites"

image

choose 1 site that you will enable Railo on for reference, I will use the default website.

Railo should now be working on the default website, if not, then just perform the steps below to do it manually.

 

Manually enabling Railo on additional websites

In your default web site root, you should have a BIN folder, simply copy this folder to any other site on which you wish to enable Railo.
You can also manually create the BIN folder and copy the following files from the C:\railo\AJP13 folder.

BonCodeAJP13.dll
BonCodeIIS.dll

You will also need to create a file named BonCodeAJP13.settings

The contents on this file are are in the aforementioned BonCode docs, but basically it will look like this.




<Settings>

<Server>localhost</Server>

<Port>8009</Port>

<EnableRemoteAdmin>True</EnableRemoteAdmin>

<EnableHeaderDataSupport>True</EnableHeaderDataSupport>

<ForceSecureSession>False</ForceSecureSession>

<AllowEmptyHeaders>False</AllowEmptyHeaders>

</Settings>

In IIS, you now need to create a managed handler for the site like this

image

The value for type is "BonCodeIIS.BonCodeCallHandler, BonCodeIIS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ad590a40d40745cf"
You can find this value in  C:\railo\AJP13BonCodeFullHandlerName.txt

Or you can add it to your web.config handlers section like this.




<add name="Boncode CFML" path="*.cfm" verb="*" type="BonCodeIIS.BonCodeCallHandler, BonCodeIIS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ad590a40d40745cf" resourceType="Unspecified" preCondition="integratedMode" />



Enable Coldfusion 10 on any website

Install ColdFusion 10 in the usual way, but DO NOT enable the built in connector on any websites.

Now simply do as per the Railo instructions above, except change the settings file as follows. Note the port is 8012 and the EnableAdobeMode setting.




<Settings>

<Server>localhost</Server>

<Port>8012</Port>

<EnableRemoteAdmin>True</EnableRemoteAdmin>

<EnableHeaderDataSupport>True</EnableHeaderDataSupport>

<ForceSecureSession>False</ForceSecureSession>

<AllowEmptyHeaders>False</AllowEmptyHeaders>

<EnableAdobeMode>True</EnableAdobeMode>

</Settings>



Some hints and Tips

Verify engine

If you want to test whether you are using Cf or Railo simply do a

<cfdump var="#server#">

If for some reason all your sites are showing Railo and not CF, and you definitely have the port set to 8012 in the settings file, then you probably have the global configuration set in IIS from a previous Railo installation where you chose to install to all sites.
In which case just download the standalone BonCode connector installer from the website and run the uninstaller, and then run the setup again following above instructions.

No default documents

If you use the wildcard handler (which you will need to enable the CF virtual mappings), you will find that default documents no longer work. To fix this you need to add your default docs to the <welcome-file-list> in tomcat.
You do this in the following file:-
C:\ColdFusion10\cfusion\runtime\conf\web.xml

Wildcard handler

The wildcard handler is required for various functionality of CF which replies on virtual mappings (directories which do not really exist). Using a wildcard handler means that *ALL* traffic goes through Tomcat, so css, js and html files too, which can cause other problems. If you do find this to be problematic then to get round this, you can create empty directories for all the virtual mappings, and stick a web.config file in those folders, and enable the wildcard handler *ONLY* on those folders.

the folders are:-

/CFFormGateway
/flex2gateway
/CFFileServlet
/cfform-internal
/flashservices/gateway
/flex-internal
/rest

your web.config entry would look like this




<add name="Boncode CFML Wildcard" path="*" verb="*" type="BonCodeIIS.BonCodeCallHandler, BonCodeIIS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ad590a40d40745cf" resourceType="Unspecified" preCondition="integratedMode" />



3 responses to “Running Railo and ColdFusion 10 side by side with BonCode”

  1. Jude Says:
    This is very useful, I tried it and it works, it is great to be able to just setup sites in IIS and not have to do all the other crap.
  2. Wil Genovese Says:
    Part of the Boncode setup does not work as advertised. I've tested this a couple times now on a DEV system I am building in preparation for a production server. I made sure to select Let Me Choose Specific Sites and then selected a test IIS site I had created. The Boncode connector app still configured ALL of IIS for the Railo Connector. If I try to remove it manually from IIS at the top level and then add the handlers back in at the site specific level IIS won't/can't connect to Railo. The only way I can get a working setup is to just remove the Railo Connectors on a site by site basis for the sites that I want to be served up by ACF and not Railo.
  3. Russ Michaels Says:
    I have mentioned this to Bilal and his answer was that this is so it is enabled on any new sites by default.
    He didn't agree with me that this is an issue though so perhaps you should send your feedback also.
    If you are adding the handlers at site level then you also need that BIN folder with the connector.

Leave a Reply

Leave this field empty

Powered by Mango Blog. Design and Icons by N.Design Studio