JRun and ColdFusion MX (CFMX) J2EE on JRun or ColdFusion MX 7 Multi-Server install can be set up in a distributed environment, meaning that the ColdFusion 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 ColdFusion/JRun machine.

Usually, the wsconfig.jar is copied to the web server machine and run, pointing it back at the remote machine's JRun server instance. There may be occasions, however, when the tool doesn't work properly, for example, due to firewall or network security restrictions. Should this happen, the connector can still be configured manually. This TechNote demonstrates the steps required for manually configuring connections to Apache, IIS and iPlanet web sites in a distributed environment.

Setup steps common to each web server

For these examples, we will assume the use of three JRun servers:

  • Server1 (on proxy port 51001 - connecting to Apache 2.x)
  • Server2 (on proxy port 51002 - connecting to IIS 5)
  • Server3 (on proxy port 51003 - connecting to iPlanet 4 or 6)

Replace jrun_root with the actual JRun 4/ColdFusion installation directory, typically C:\jrun4 for Windows and /opt/jrun4 on Unix.

Before you begin the steps below, copy thejrun_root\lib\wsconfig.jar file from the machine where JRun is installed to the web server machine. The wsconfig.jar will be needed in Step 4 when you have to extract the appropriate web server modules from the JAR file.

Step 1:

On the JRUN machine, locate thejrun_root\servers\yourJRunInstance\SERVER-INF\jrun.xml file and, using a text editor such as notepad, make the following changes:

  1. Find the entry labeled ProxyService.
  2. Add <attribute name="deactivated">false</attribute>.
  3. Save the file.
  4. Restart the JRun Server Instance.

Step 2:

On the WEBSERVER machine, create the following directorycf_root\runtime\lib\wsconfig\ (one for each connected web site). Create the following directories underjrun_root\lib (one for each connected web site):

  1. jrun_root\lib\wsconfig\1 (this folder will contain configuration information for Apache)
  2. jrun_root\lib\wsconfig\2 (this folder will contain configuration information for IIS)
  3. jrun_root\lib\wsconfig\3 (this folder will contain configuration information for iPlanet)

It is recommended to mirror the connector software directory structure from the JRun machine on the web server for consistency and simplicity.

Step 3:

On the WEBSERVER machine, create a file namedwsconfig.properties in the jrun_root\lib\wsconfig directory. The wsconfig.properties file contains the data that the Web Server Configuration tool uses to maintain web server configuration information. It should contain the following information (actual locations should reflect your specific installation directories):

#JRun Web Server Configuration File #Fri May 23 10:19:20 EDT 2003 1=Apache,C:/Apache Group/Apache2/conf,"","","" 1 .srv=000.0.0.0,"server1" 2 =IIS,1,false,"" 2 .srv=000.0.0.0,"server2" 3 =NES,C:/Netscape/Server4/https-servername/config 3 .srv=000.0.0.0,"server3"

Note: Replace "000.0.0.0" in the examples abovewith the IP address of the remote JRun machine.

Step 4 - Configure the Web Server(s)

Apache Configuration: (These steps are done on the WEBSERVER machine.)

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

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



      proxyservers=000.0.0.0:51001



      (Notice that 51001 corresponds to the port assigned to Server1).
    • mod_jrun20.so (extract the appropriate file for your operating system from the wsconfig.jar you copied over from the JRun machine)



      Note:mod_jrun20.so supports Apache 2.x web servers. To connect to Apache 1.3.x, usemod_jrun.so.
  2. Edit the Apache configuration file (located in{apache-root}/conf/httpd.conf) and add the following section at the end of the file:
    # JRun Settings LoadModule jrun_module c:/jrun4/lib/wsconfig/1/mod_jrun20.so<IfModule mod_jrun.c> JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ssl false JRunConfig Ignoresuffixmap false JRunConfig Serverstore c:/jrun4/lib/wsconfig/1/jrunserver.store JRunConfig Bootstrap 000.0.0.0:51001 #JRunConfig Errorurl <optionally redirect to this URL on errors> AddHandler jrun-handler .jsp .jws</IfModule>
    Note the following entries from the Apache configuration file, above:
    • LoadModule jrun_module c:/jrun4/lib/wsconfig/1/mod_jrun20.so - points to the folder and file name of the Apache connector
    • JRunConfig Serverstore c:/jrun4/lib/wsconfig/1/jrunserver.store - points to the location of the jrunserver.store file
    • JRunConfig Bootstrap 000.0.0.0:51001 - corresponds to defined port for Server1

Microsoft IIS 4.0 and 5.0 Configuration: (These steps are done on the WEBSERVER machine.)

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

  1. Extract jrunwin32.dll from thejrun_root\lib\wsconfig.jar and copy it tojrun_root\lib\wsconfig\
  2. Extract jrun.dll from jrun_root\lib\wsconfig.jar and copy it to jrun_root\lib\wsconfig\2
  3. Create a jrun.ini file in jrun_root\lib\wsconfig\2. It should contain the following information:



    verbose=false scriptpath=/JRunScripts/jrun.dll serverstore=C:/JRun4/lib/wsconfig/2/jrunserver.store bootstrap=000.0.0.0:51002 apialloc=false ssl=false ignoresuffixmap=false #errorurl=<optionally redirect to this URL on errors>
  4. Create a jrunserver.store file injrun_root\lib\wsconfig\2.



    Edit as follows:



    proxyservers=000.0.0.0:51002
  5. Using the IIS Management Console, add a virtual directory named JRunScripts to the web site.



    The Local Path property of the folder should point tojrun_root\lib\wsconfig\2 and Execute Permissions must be set to "Scripts and Executables"
  6. Add the JRunConnector Filter to the ISAPI Filter properties of the web site by doing the following:
    • Right click on the web site.
    • Select the ISAPI Filters tab.
    • Click the Add button.
    • In the "Filter Name" text box, enter "JRun Connector Filter".
    • In the "Executable" text box, browse to or enter "jrun_root\lib\wsconfig\2\jrun.dll"
    • Restart the World Wide Web Publishing service (in Control Panel) and check the ISAPI Filter property for the web site. The JRun Connector Filter should show a high priority with a green arrow pointing upwards.

Microsoft IIS 6.0 Configuration: (These steps are done on the WEBSERVER machine.)

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

  1. Extract jrunwin32.dll from thejrun_root\lib\wsconfig.jar and copy it tojrun_root\lib\wsconfig\
  2. Extract jrun_iis6_wildcard.dll fromjrun_root\lib\wsconfig.jar and copy it tojrun_root\lib\wsconfig\2
  3. Create a jrun_iis6_wildcard.ini file injrun_root\lib\wsconfig\2. It should contain the following information:



    verbose=false serverstore=C:/JRun4/lib/wsconfig/2/jrunserver.store bootstrap=000.0.0.0:51002 apialloc=false ssl=false ignoresuffixmap=false #errorurl=<optionally redirect to this URL on errors>
  4. Create a jrunserver.store file injrun_root\lib\wsconfig\2.



    Edit as follows:



    proxyservers=000.0.0.0:51002
  5. Right click on the website you are connecting to and select Properties. Select the Home Directory tab and click on the Configuration button. Add extension mappings in the Application extensions for .jsp and .jws. Point all of them tojrun_root\lib\wsconfig\jrun_iis6.dll.
  6. In the Wildcard application maps at the lower half of the same window, insert the following:



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

iPlanet 4 Configuration: (These steps are done on the WEBSERVER machine.)

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

  1. Extract the jrun_nsapi35.so file from the wsconfig.jar file and copy it to the jrun_root\lib\wsconfig\3 folder.
  2. Create a jrunserver.store file in thejrun_root\lib\wsconfig\3 folder.



    Edit it as follows:



    proxyservers=000.0.0.0:51003
  3. Add the following to the Init section of the obj.conf file for the iPlanet server (note that each Init should be added as a separate line in the file):
    Init fn="load-modules" shlib="C:/JRun4/lib/wsconfig/3/jrun_nsapi35.dll" funcs="jruninit,jrunfilter,jrunservice" Init fn="jruninit" serverstore="C:/JRun4/lib/wsconfig/3/jrunserver.store" bootstrap="000.0.0.0:51003" verbose="false" apialloc="false" ssl="false" ignoresuffixmap="false"
  4. Add the following to the Object name="default" section of the obj.conf file:
    NameTrans fn="jrunfilter" serverstore="C:/JRun4/lib/wsconfig/3/jrunserver.store" 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: (These steps are done on the WEBSERVER machine.)

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

  1. Use steps 1 and 2 of iPlanet 4 configuration.
  2. Add the following to the object-default section of the obj.conf file:
    NameTrans fn="jrunfilter" serverstore="C:/JRun/lib/wsconfig/3/jrunserver.store" bootstrap="000.0.0.0:51003" 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 the magnus.conf file (note each Init is a single line):
    Init fn="load-modules" shlib="C:/JRun/lib/wsconfig/3/jrun_nsapi35.dll" funcs="jruninit,jrunfilter,jrunservice" Init fn="jruninit" serverstore="C:/JRun/lib/wsconfig/3/jrunserver.store" bootstrap="000.0.0.0:51003" verbose="false" apialloc="false" ssl="false" ignoresuffixmap="false"
  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