ColdFusion10 comes with a webserver configuration tool for connecting to external web servers. There can be occasions, however, when the tool doesn't work properly. If tool doesn't work, you can configure connector manually. This TechNote demonstrates the steps required for manually configuring connection to Sun WebServer 7.

ColdFusion10 server connect to webserver through Connector Port, which is in server.xml. You can find this file in the {CF-HOME}\cfusion\runtime\conf folder.

In all the configuration below, replace {CF-HOME} with actual ColdFusion10 installation directory. (For example, on UNIX, the directory is C:\ColdFusion10 for windows and /opt/ColdFusion10.)

  1. Extract the DLL or .so from wsconfig.jar, in {CF-HOME}\cfusion\runtime\lib.

    • You can find DLL in connectors\nsapi\intel-win\prebuilt\nsapi_redirect.dll
    • You can find .so in connectors\nsapi\sprac-solaris\prebuilt\nsapi_rebuild.so
  2. Create a folder under {CF-HOME}\config\wsconfig\{magic-number} and copy the DLL into that folder.

  3. Create workers.properties under {CF-HOME}\config\wsconfig\{magic-number} and copy the content below. Make sure that the port mentioned is same as connector port mentioned for protocol "AJP/1.3" in server.xml.

    worker.list=cfusion
    worker.cfusion.type=ajp13
    worker.cfusion.host=localhost
    worker.cfusion.port=8012
    worker.cfusion.connection_pool_size=100
    worker.cfusion.max_reuse_connections=250

  4. Update the file magnus.conf with connector and workers.properties. Copy the content below. Init fn="load-modules" shlib="{CF-HOME}/config/wsconfig/{magic-number}/nsapi_redirect.dll" funcs="jk_init,jk_service"

    Init fn="jk_init" worker_file="{CF-HOME}/config/wsconfig/{magic-number}/workers.properties" log_level="info" log_file="{CF-HOME}/config/wsconfig/{magic-number}/nsapi.log" shm_file="{CF-HOME}/config/wsconfig/{magic-number}/jk_shm"

  5. Update the obj.conf with handlers and worker settings.

    Add the following to the object-default section of the obj.conf file.

    NameTrans fn="assign-name" from="/*.hbmxml" name="jknsapi"
    NameTrans fn="assign-name" from="/*.jsp" name="jknsapi"
    NameTrans fn="assign-name" from="/*.sws" name="jknsapi"
    NameTrans fn="assign-name" from="/*.cfswf" name="jknsapi"
    NameTrans fn="assign-name" from="/*.cfr" name="jknsapi"
    NameTrans fn="assign-name" from="/*.cfc/*" name="jknsapi"
    NameTrans fn="assign-name" from="/*.cfc" name="jknsapi"
    NameTrans fn="assign-name" from="/*.cfml" name="jknsapi"
    NameTrans fn="assign-name" from="/*.swc" name="jknsapi"
    NameTrans fn="assign-name" from="/*.cfm/*" name="jknsapi"
    NameTrans fn="assign-name" from="/*.cfm" name="jknsapi"
    NameTrans fn="assign-name" from="/*.as" name="jknsapi"
    NameTrans fn="assign-name" from="/*.mxml" name="jknsapi"
    NameTrans fn="assign-name" from="/*.cfml/*" name="jknsapi"
    NameTrans fn="assign-name" from="/rest/*" name="jknsapi"
    NameTrans fn="assign-name" from="/flex-internal/*" name="jknsapi"
    NameTrans fn="assign-name" from="/flashservices/gateway/*" name="jknsapi"
    NameTrans fn="assign-name" from="/cfform-internal/*" name="jknsapi"
    NameTrans fn="assign-name" from="/CFFileServlet/*" name="jknsapi"
    NameTrans fn="assign-name" from="/cffileservlet/*" name="jknsapi"
    NameTrans fn="assign-name" from="/flex2gateway" name="jknsapi"
    NameTrans fn="assign-name" from="/flex2gateway/*" name="jknsapi"
    NameTrans fn="assign-name" from="/CFFormGateway/*" name="jknsapi"
    NameTrans fn="assign-name" from="/cfformgateway/*" name="jknsapi"

  6. Add the following to the end of the obj.conf file:

    <Object name="jknsapi">
    Service fn="jk_service" method="*" worker="cfusion"
    </Object>
  7. Restart the web server.

Note:

You can also download Connector binaries from Adobe ColdFusion download page.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy