Manually configure the web server connector | Distributed environment | ColdFusion MX standalone

You can set up ColdFusion MX (CFMX) and JRun in a Distributed Environment. In this setup, the CFMX or JRun server is on a different physical machine than the web server. In a distributed environment, the connector is installed on the web server machine and sends the request across the network to the remote CFMX/JRun machine.

CFMX and JRun come with a Web Server Configuration Tool for connecting to external web servers. Usually, you copy the wsconfig.jar to the web server machine and run it pointing it back at the remote machine. There are occasions, however, when the tool doesn't work properly (for example, due to firewall or network security restrictions). If the tool doesn't work, you can still configure the connector manually. This TechNote demonstrates the steps required for manually configuring connections to Apache, IIS, and iPlanet websites in a distributed environment.

The ColdFusion MX Standalone server can only connect to one web server 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 or C:\CFusionMX7 for Windows and /opt/coldfusionmx or /opt/coldfusionmx7 on Unix.

Before you begin the steps below, copy thecf_root\runtime\lib\wsconfig.jar file from the machine where ColdFusion is installed to the web server machine. The wsconfig.jar is required in Step 4 when you have to extract the appropriate web server modules from the JAR file.

Step 1: Edit the thecf_root\runtime\servers\default\SERVER-INF\jrun.xml file or orcf_root\runtime\servers\coldfusion\SERVER-INF\jrun.xml file.

 

  1. On the COLDFUSION machine, locate thecf_root\runtime\servers\default\SERVER-INF\jrun.xml file in ColdFusion MX 6.1 orcf_root\runtime\servers\coldfusion\SERVER-INF\jrun.xml in ColdFusion MX 7 and, using a text editor such as notepad.
  2. Find the entry labeled ProxyService.
  3. Add <attribute name="deactivated">false</attribute>.
  4. Save the file.
  5. Restart the ColdFusion Application Server.

Step 2: On the WEBSERVER machine, create the following directorycf_root\runtime\lib\wsconfig\ (one for each connected website):

cf_root\runtime\lib\wsconfig\1

Adobe recommends that you mirror the connector software directory structure from the CFMX machine on the web server for consistency and simplicity.

Step 3: On the WEBSERVER machine, create a file named wsconfig.properties in the cf_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 contains the following information (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"

Note: Use "coldfusion" instead of "default" for ColdFusion MX 7.

IIS:

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

Note: Use "coldfusion" instead of "default" for ColdFusion MX 7.

iPlanet/SunOne:

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

Note: First line is actual path to the iPlanet/SunOne config directory. Second line, use "coldfusion" instead of "default" for ColdFusion MX 7.

Step 4: Configure the Web Servers.

Note: These steps are done on the web server machine.

Apache Configuration:

  1. Populate the cf_root\runtime\lib\wsconfig\1 directory with the following files: (Note: Replace "000.0.0.0" in the examples below with the IP address of the remote ColdFusion machine.)
    • jrunserver.store - Create a file called jrunserver.store and enter the following information:

      ColdFusion MX 6.1:

      proxyservers=000.0.0.0:51010



      ColdFusion MX 7:

      proxyservers=000.0.0.0: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 text at the end of the file:

    Note: Replace "000.0.0.0" in the examples below with the IP address of the remote ColdFusion machine.
# 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 000.0.0.0:51010 (for 6.1 or 000.0.0.0:51011 for 7.0) #JRunConfig Errorurl <optionally redirect to this URL on errors> AddHandler jrun-handler .cfm .cfml .cfc .jsp .jws  </IfModule>

 

  1. 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 filename 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 on the WEBSERVER machine.
  • JRunConfig Bootstrap 000.0.0.0:51010 or 000.0.0.0:51011 - points to the remote server and proxy port of the ColdFusion server

Microsoft IIS 4 and 5 Configuration:

  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:

    Note: Replace "000.0.0.0" in the examples below with the IP address of the remote ColdFusion machine.
    verbose=false scriptpath=/JRunScripts/jrun.dll serverstore={cf-root}/runtime/lib/wsconfig/1/jrunserver.store bootstrap=000.0.0.0:51010 (for MX 6.1; 000.0.0.0:51011 for MX 7) apialloc=false ssl=false ignoresuffixmap=false #errorurl=<optionally redirect to this URL on errors>
    *serverstore above points to the jrunserver.store file that you create in the next step on the WEBSERVER machine.
  4. Create thejrunserver.store file incf_root\runtime\lib\wsconfig\1.



    Edit as follows:

    proxyservers=000.0.0.0:51010 (for MX 6.1; 000.0.0.0: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, .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 Configuration:

  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 should contain the following information:

    Note: Replace "000.0.0.0" in the examples below with the IP address of the remote ColdFusion machine.
    verbose=false serverstore=cf_root/runtime/lib/wsconfig/1/jrunserver.store bootstrap=000.0.0.0:51010 (for MX 6.1; 000.0.0.0: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=000.0.0.0:51010 (for MX 6.1; 000.0.0.0: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 tocf_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, .jsp and .jws. Point all of them to cf_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 Configuration:

  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:

    Note: Replace "000.0.0.0" in the examples below with the IP address of the remote ColdFusion machine.

    proxyservers=000.0.0.0:51010 (for MX 6.1; 000.0.0.0:51011 for MX 7)
  3. Add the following to the Init section of theobj.conf file for the iPlanet server (Note: Each Init 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="000.0.0.0:51010" verbose="false" apialloc="false" ssl="false" ignoresuffixmap="false"
    Note: Use bootstrap="000.0.0.0: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="000.0.0.0:51010" (for MX 6.1; 000.0.0.0:51011 for MX 7) ObjectType fn=type-by-exp exp=*.jsp type="jrun-internal/" ObjectType fn=type-by-exp exp=*.jws type="jrun-internal/" 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 Configuration:

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

    Note: Replace "000.0.0.0" in the examples below with the IP address of the remote ColdFusion machine.
    NameTrans fn="jrunfilter" serverstore="cf_root/runtime/lib/wsconfig/1/jrunserver.store" bootstrap="000.0.0.0:51010" (for 6.1 or 000.0.0.0:51011 for 7.0) ObjectType fn=type-by-exp exp=*.jsp type="jrun-internal/" ObjectType fn=type-by-exp exp=*.jws type="jrun-internal/" 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="000.0.0.0:51010" verbose="false" apialloc="false" ssl="false" ignoresuffixmap="false"
    Note: Substitute bootstrap="000.0.0.0:51011" above for ColdFusion MX 7.
  5. Restart the web server.

Get help faster and easier

New user?