ColdFusion MX 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 the tool doesn't work, you can configure the connector manually. This TechNote demonstrates the steps required for manually configuring connections to Apache 2, IIS, and iPlanet websites.

The ColdFusion MX Standalone server can only connect to one webserver at a time and does so through a proxy port. The default proxy port is 51010 in ColdFusion MX 6.1 and 51011 in ColdFusion MX 7. If you are using ColdFusion MX 7, then change "default" to "coldfusion" and change 51010 to 51011.

In all the configurations below, replace cf_root with the actual ColdFusion MX installation directory, typically C:\CFusionMX for Windows and /opt/coldfusionmx on Unix.

1: Edit the thecf_root\runtime\servers\default\SERVER-INF\jrun.xml file in ColdFusion MX 6.1 or cf_root\runtime\servers\coldfusion\SERVER-INF\jrun.xml in ColdFusion MX 7

  1. Open the http://kb2.adobe.com/cps/408/kb408941.html or cf_root\runtime\servers\coldfusion\SERVER-INF\jrun.xml file in a text editor, such Notepad.
  2. Find the entry labeled ProxyService.
  3. Add <attribute name="deactivated">false</attribute>.
  4. Save the file.
  5. Restart the ColdFusion Application Server.

2: Create the following directory under cf_root\lib (one for each connected website)

cf_root\runtime\lib\wsconfig\1

3: Create a file named wsconfig.properties in thecf_root\runtime\lib\wsconfig directory

The wsconfig.properties file contains the data that the Web Server Configuration tool uses to maintain web server configuration information. Depending on the web server, the wsconfig.properties contain the following information (make sure that actual locations reflect your specific installation directories).

Apache Windows:

*The third line below points to the Apache configuration directory

*The fourth line below has the name of the ColdFusion MX server: "default" for MX 6.1 and "coldfusion" for MX 7.

#JRun Web Server Configuration File #Fri May 23 10:19:20 EDT 2003 1=Apache,C:/Apache Group/Apache2/conf,"","","" 1 .srv=localhost,"default"

Apache Unix:

#JRun Web Server Configuration File #Fri May 23 10:19:20 EDT 2003 1=Apache,/opt/apache/2.0.47/conf,"","","" 1 .srv=localhost,"default"

*Use "coldfusion" instead of "default" for ColdFusion MX 7.

IIS:

1 =IIS,1,false,"" 1 .srv=localhost,"default"

*Use "coldfusion" instead of "default" for ColdFusion MX 7.

iPlanet/SunOne:

*First line is actual path to the iPlanet/SunOne config directory.

*Second line use "coldfusion" instead of "default" for ColdFusion MX 7.

1 =NES,C:/Netscape/Server4/https-servername/config 1 .srv=localhost,"default"

4: Configure the web servers

Apache

  1. Populate the cf_root\runtime\lib\wsconfig\1 directory with the following files:
    • jrunserver.store - Create a file called jrunserver.store and enter the following information:

      ColdFusion MX 6.1:

      proxyservers=127.0.0.1:51010



      ColdFusion MX 7:

      proxyservers=127.0.0.1:51011
    • mod_jrun20.so - Extract the appropriate file for your operating system fromcf_root\runtime\lib\wsconfig.jar)



      Note: mod_jrun20.so supports Apache 2.x web servers. To connect to Apache 1.3.x, use mod_jrun.so.
  2. Edit the Apache configuration file (located inapache-root/conf/httpd.conf) and add the following section at the end of the file:

    # JRun Settings LoadModule jrun_module cf_root/runtime/lib/wsconfig/1/mod_jrun20.so<IfModule mod_jrun20.c> JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ssl false JRunConfig Ignoresuffixmap false JRunConfig Serverstore cf_root/runtime/lib/wsconfig/1/jrunserver.store JRunConfig Bootstrap 127.0.0.1:51010 (for 6.1 or 127.0.0.1:51011 for 7.0) #JRunConfig Errorurl <optionally redirect to this URL on errors> AddHandler jrun-handler .cfm .cfml .cfc .jsp .jws .cfr .cfswf</IfModule>


    Note the following entries from the Apache configuration file, above:
    • LoadModule jrun_modulecf_root/lib/wsconfig/1/mod_jrun20.so - points to the folder and file name of the Apache connector. To connect to Apache 2.x, use mod_jrun20.so. To connect to Apache 1.3.x, use mod_jrun.so.
    • <IfModule mod_jrun20.c> - Value of mod_jrun specified matches the value entered in LoadModule line. For Apache 2.x, use mod_jrun20.c. For Apache 1.3.x, use mod_jrun.c.
    • JRunConfig Serverstorecf_root/lib/wsconfig/1/jrunserver.store - points to the location of the jrunserver.store file
    • JRunConfig Bootstrap 127.0.0.1:51010 or 127.0.0.1:51011 - points to the server and proxy port of the JRun server

Microsoft IIS 4 and 5

  1. Extract jrunwin32.dll fromcf_root\runtime\lib\wsconfig.jar and copy it tocf_root\runtime\lib\wsconfig\.
  2. Extract jrun.dll fromcf_root\runtime\lib\wsconfig.jar and copy it tocf_root\runtime\lib\wsconfig\1.
  3. Create a jrun.ini file incf_root\runtime\lib\wsconfig\1. It contains the following information:

    verbose=false scriptpath=/JRunScripts/jrun.dll serverstore={cf-root}/runtime/lib/wsconfig/1/jrunserver.store bootstrap=127.0.0.1:51010 (for MX 6.1; 127.0.0.1:51011 for MX 7) apialloc=false ssl=false ignoresuffixmap=false #errorurl=<optionally redirect to this URL on errors>
    *serverstore above points to the actual JRun 4 installation.
  4. Create the jrunserver.store file incf_root\runtime\lib\wsconfig\1.



    Edit as follows:

    proxyservers=127.0.0.1:51010 (for MX 6.1; 127.0.0.1:51011 for MX 7)
  5. Using the IIS Management Console, add a virtual directory namedJRunScripts to the website.

    The Local Path property of the folder points to cf_root\runtime\lib\wsconfig\1 and Execute Permissions must be set to "Scripts and Executables".
  6. Add the JRunConnector Filter to the ISAPI Filter properties of the website:
    1. Right-click on the website.
    2. Select the ISAPI Filters tab.
    3. Click the Add button.
    4. In the Filter Name textbox, enter "JRun Connector Filter".
    5. In the Executable textbox, browse to or enter "cf_root\runtime\lib\wsconfig\1\jrun.dll".
    6. Select the Home Directory tab and click the Configuration button. Add extension mappings in the Application extensions for .cfc, .cfm, .cfml, .cfr, .cfswf, jsp and .jws. Point all of them tocf_root\runtime\lib\wsconfig\1\jrun.dll.
    7. Restart the World Wide Web Publishing service from the Windows Control Panel and check the ISAPI Filter property for the website. The JRun Connector Filter shows a high priority with a green arrow pointing upwards.

Microsoft IIS 6

  1. Extract jrunwin32.dll andjrun_iis6.dll fromcf_root\runtime\lib\wsconfig.jar and copy them tocf_root\runtime\lib\wsconfig\.
  2. Extract jrun_iis6_wildcard.dll fromcf_root\runtime\lib\wsconfig.jar and copy it tocf_root\runtime\lib\wsconfig\1.
  3. Create a jrun_iis6_wildcard.ini file incf_root\runtime\lib\wsconfig\1. It contains the following information:
    verbose=false serverstore=cf_root/runtime/lib/wsconfig/1/jrunserver.store bootstrap=127.0.0.1:51010 (for MX 6.1; 127.0.0.1:51011 for MX 7) apialloc=false ssl=false #errorurl=<optionally redirect to this URL on errors>
  4. Create the jrunserver.store file incf_root\runtime\lib\wsconfig\1.

    Edit as follows:

    proxyservers=127.0.0.1:51010 (for MX 6.1; 127.0.0.1:51011 for MX 7)
  5. Using the IIS Management Console, add a new Web Service Extension named Macromedia Server Extensions. Set the status to Allowed. Set Required Files to

    cf_root\runtime/lib\wsconfig\1\jrun_iis6_wildcard.dll andcf_root\runtime\lib\wsconfig\jrun_iis6.dll.
  6. Right-click on the website you are connecting and select the properties. Select the Home Directory tab and click on the Configuration button. Add extension mappings in the Application extensions for .cfc, .cfm, .cfml, .cfr, .cfswf,.jsp and .jws. Point all of them tocf_root\runtime\lib\wsconfig\jrun_iis6.dll.
  7. In the Wildcard application maps at the lower half of the same window, insert the following:

    cf_root\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll.

iPlanet 4

  1. Extract jrun_nsapi35.so fromcf_root\runtime\lib\wsconfig.jar and copy it to thecf_root\runtime\lib\wsconfig\1 folder.
  2. Create a jrunserver.store file in thecf_root\runtime\lib\wsconfig\1 folder.

    Edit it as follows:

    proxyservers=127.0.0.1:51010 (for MX 6.1; 127.0.0.1:51011 for MX 7)
  3. Add the following to the Init section of theobj.conf file for the iPlanet server:

    Note: EachInit command is entered as a single line in the file.



    Init fn="load-modules" shlib="cf_root/runtime/lib/wsconfig/1/jrun_nsapi35.dll" funcs="jruninit,jrunfilter,jrunservice"

    Init fn="jruninit" serverstore="cf_root/runtime/lib/wsconfig/1/jrunserver.store" bootstrap="127.0.0.1:51010" verbose="false" apialloc="false" ssl="false" ignoresuffixmap="false"



    *Use bootstrap="127.0.0.1:51011" above for ColdFusion MX 7.
  4. Add the following to the Object name="default" section of the obj.conf file:

    NameTrans fn="jrunfilter" serverstore="cf_root/runtime/lib/wsconfig/1/jrunserver.store" bootstrap="127.0.0.1:51010" (for MX 6.1; 127.0.0.1:51011 for MX 7)

    ObjectType fn=type-by-exp exp=*.jsp type="jrun-internal/"

    ObjectType fn=type-by-exp exp=*.jws type="jrun-internal/"

    ObjectType fn=type-by-exp exp=*.cfm type="jrun-internal/ext"

    ObjectType fn=type-by-exp exp=*.cfml type="jrun-internal/ext"

    ObjectType fn=type-by-exp exp=*.cfc type="jrun-internal/ext"

    ObjectType fn=type-by-exp exp=*.cfr type="jrun-internal/ext"

    ObjectType fn=type-by-exp exp=*.cfswf type="jrun-internal/ext"

    Service method=(GET|POST) type="jrun-internal/" fn="jrunservice"
  5. Add the following to the end of the obj.conf file:

    <Object name="jrun"> PathCheck fn="jrunfilter" Service fn="jrunservice"</Object>
  6. Restart the web server.

iPlanet 6

  1. Use steps 1 and 2 of the iPlanet 4 configuration.
  2. Add the following to the object-default section of theobj.conf file:

    NameTrans fn="jrunfilter" serverstore="cf_root/runtime/lib/wsconfig/1/jrunserver.store" bootstrap="127.0.0.1:51010" (for 6.1 or 127.0.0.1:51011 for 7.0)

    ObjectType fn=type-by-exp exp=*.jsp type="jrun-internal/"

    ObjectType fn=type-by-exp exp=*.jws type="jrun-internal/"ObjectType fn=type-by-exp exp=*.cfm type="jrun-internal/ext"

    ObjectType fn=type-by-exp exp=*.cfml type="jrun-internal/ext"

    ObjectType fn=type-by-exp exp=*.cfc type="jrun-internal/ext"

    ObjectType fn=type-by-exp exp=*.cfr type="jrun-internal/ext"

    ObjectType fn=type-by-exp exp=*.cfswf type="jrun-internal/ext"

    Service method=(GET|POST) type="jrun-internal/" fn="jrunservice"
  3. Add the following to the end of the obj.conf file:

    <Object name="jrun"> PathCheck fn="jrunfilter" Service fn="jrunservice"</Object>
  4. Add the following to the end of themagnus.conf file (Note: Each Init command is entered as a single line):



    Init fn="load-modules" shlib="cf_root/runtime/lib/wsconfig/1/jrun_nsapi35.dll" funcs="jruninit,jrunfilter,jrunservice"

    Init fn="jruninit" serverstore="cf_root/runtime/lib/wsconfig/1/jrunserver.store" bootstrap="127.0.0.1:51010" verbose="false" apialloc="false" ssl="false" ignoresuffixmap="false"



    *Substitute bootstrap="127.0.0.1:51011" above for ColdFusion MX 7.
  5. Restart the web server.

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