ColdFusion MX: Manually configuring the web server connector for ColdFusion MX Standalone
ColdFusion MX comes with a webserver configuration tool for connecting to external web servers. There may be occasions, however, when the tool doesn't work properly. Should this happen, the connector can still be configured 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.
Step 1:
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, make the following changes:
- Find the entry labeled ProxyService.
- Add <attribute name="deactivated">false</attribute>.
- Save the file.
- Restart the ColdFusion Application Server.
Step 2:
Create the following directory under cf_root\lib (one for each connected web site):
cf_root\runtime\lib\wsconfig\1
Step 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 should contain the following information (actual locations should 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"
Step 4:
Configure the Web Server(s).
Apache Configuration:
- 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.
- jrunserver.store - Create a file called jrunserver.store and enter the following information:
- 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, usemod_jrun20.so. To connect to Apache 1.3.x, usemod_jrun.so. -
<IfModule mod_jrun20.c>- Value of mod_jrun specified should match value entered inLoadModuleline. For Apache 2.x, usemod_jrun20.c. For Apache 1.3.x, usemod_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 Configuration:
- Extract jrunwin32.dll fromcf_root\runtime\lib\wsconfig.jar and copy it tocf_root\runtime\lib\wsconfig\.
- Extract jrun.dll fromcf_root\runtime\lib\wsconfig.jar and copy it tocf_root\runtime\lib\wsconfig\1.
- Create a jrun.ini file incf_root\runtime\lib\wsconfig\1. It should contain 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 should point to actual JRun 4 installation - 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)
- Using the IIS Management Console, add a virtual directory namedJRunScripts to the website.
The Local Path property of the folder should point tocf_root\runtime\lib\wsconfig\1 and Execute Permissions must be set to "Scripts and Executables". - Add the JRunConnector Filter to the ISAPI Filter properties of the website:
- Right-click on the website.
- 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 "cf_root\runtime\lib\wsconfig\1\jrun.dll".
- 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\1\jrun.dll.
- 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 should show a high priority with a green arrow pointing upwards.
Microsoft IIS 6 Configuraton:
- Extract jrunwin32.dll andjrun_iis6.dll fromcf_root\runtime\lib\wsconfig.jar and copy them tocf_root\runtime\lib\wsconfig\.
- Extract jrun_iis6_wildcard.dll fromcf_root\runtime\lib\wsconfig.jar and copy it tocf_root\runtime\lib\wsconfig\1.
- Create a jrun_iis6_wildcard.ini file incf_root\runtime\lib\wsconfig\1. It should contain 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>
- 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)
- 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. - 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.
- 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:
- Extract jrun_nsapi35.so fromcf_root\runtime\lib\wsconfig.jar and copy it to thecf_root\runtime\lib\wsconfig\1 folder.
- 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)
- Add the following to the Init section of theobj.conf file for the iPlanet server (Note: Each
Initcommand 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"
*Usebootstrap="127.0.0.1:51011"above for ColdFusion MX 7. - 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" - Add the following to the end of the obj.conf file:
<Object name="jrun"> PathCheck fn="jrunfilter" Service fn="jrunservice"</Object>
- Restart the web server.
iPlanet 6 Configuration:
- Use steps 1 and 2 of the iPlanet 4 configuration.
- 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" - Add the following to the end of the obj.conf file:
<Object name="jrun"> PathCheck fn="jrunfilter" Service fn="jrunservice"</Object>
- Add the following to the end of themagnus.conf file (Note: Each
Initcommand 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"
*Substitutebootstrap="127.0.0.1:51011"above for ColdFusion MX 7. - Restart the web server.
Additional Information
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
