25 April 2011
You should have some understanding of setting up a distributed environment and understand the reasons for setting up such an environment for your technical and business needs.
Additional required other products
Intermediate
ColdFusion can be set up in a distributed environment, meaning that the ColdFusion is on a different physical machine than the web server. In a distributed environment, the connector is installed on the server hosting the web server and this server sends the request across the network to the remote server hosting ColdFusion .
ColdFusion comes with a Web Server Configuration Tool for connecting to external web servers. Usually, you copy the wsconfig.jar file to the web server machine and run the web server in a configuration where it refers to the remote server hosting ColdFusion. There may be occasions, however, when the Web Server Configuration Tool doesn't work properly, for example, due to a firewall or network security restrictions. Should this happen, you can still configure the connector manually. This article demonstrates the steps required for manually configuring connections to Internet Information Services 7 websites in a distributed environment.
The ColdFusion Standalone server can only connect to one web server at a time and does so through a proxy port. The default proxy port is 51011 in ColdFusion.
In all of the configurations below, replace cf_root with the actual ColdFusion installation directory, typically C:\ColdFusion9 for Windows and /opt/ColdFusion9 on Unix if you used the default settings during installation.
Before you begin the steps below, copy the cf_root\runtime\lib\wsconfig.jar file from the machine where ColdFusion is installed to the web server machine. You must use the wsconfig.jar file in Step 4 when you have to extract the appropriate web server modules from the JAR file.
On the COLDFUSION machine, locate the cf_root\runtime\servers\coldfusion\SERVER-INF\jrun.xml file for ColdFusion and make the following changes:
ProxyService .<attribute name="deactivated">false</attribute> .On the WEBSERVER machine, create the following directory cf_root\runtime\lib\wsconfig\ (create a directory for each connected website):
cf_root\runtime\lib\wsconfig\1
It is a best practice to mirror the connector software directory structure from the ColdFusion server on the web server for consistency and simplicity.
On the web server 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 file should contain the following information.
1=IIS,1,false,""
1.srv=localhost,"cfusion"
1.cfmx=true,<null>
Configure the web server IIS 7. These steps are done on the web server machine.
verbose=true
Buffer=true
serverstore=cf_root/runtime/lib/1/jrunserver.store
bootstrap=000.0.0.0:51011
apialloc=false
#errorurl=url <optionally redirect to this URL on errors>
#proxyretryinterval=600 <number of seconds to wait before trying to reconnect to unreachable clustered server>
#connecttimeout=15 <number of seconds to wait on a socket connect to a jrun server>
#recvtimeout=300 <number of seconds to wait on a socket receive to a jrun server>
#sendtimeout=15 <number of seconds to wait on a socket send to a jrun server>
#maxworkerthreads=25 <number of worker threads created for asynchronous request processing>
proxyservers=000.0.0.0:51011
Just as you added the information above for the *.cfm in the above steps, add the following information for the *.cfc files. In other words, add cfcHandler - *.cfc, cfmlHandler - *.cfml,cfrHandler - *.cfr,cfswfHandler -*.cfswf,hbmxmlHandler - *.hbmxml (*.jsp,*.jws if required).
After configuring IIS7 as the web server you might stop getting detailed error messages and simply get the "500 Internal server error."
If you wish to get the detailed error message for both local and remote machines, continue to step 8.
The goal of this article is to provide the manual steps to configure Internet Information Services 7 as connector with ColdFusion 9 when you are facing issues with configuring the connector though the Web Server Configuration Tool.

This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 Unported License.
Tutorials & Samples |