ColdFusion uses the Web Server Configuration Tool to configure an external web server with the modules and settings that the connector needs to connect to ColdFusion. You can run the Web Server Configuration Tool through either the command-line interface or the graphical user interface (GUI). In either case, the Web Server Configuration Tool configures your external web server to interact with a ColdFusion server.
The Web Server Configuration Tool includes a GUI mode, which you can use to specify external web server configuration settings through a graphical interface.
Run the Web Server Configuration Tool in GUI mode
You can also run the Web Server Configuration Tool through a command-line interface.
Run the command-line interface
The following table describes the options:
Option |
Description |
---|---|
-ws |
Specifies the web server, as follows:
The web server name you supply is not case-sensitive. |
-dir |
Specifies the path to the configuration directory (Apache conf or NES/iPlanet config). |
-site |
Specifies the IIS website name (case-sensitive). Specify All or 0 to configure the connector at a global level, which applies to all IIS websites. |
-host |
Specifies the ColdFusion server address. The default value is localhost. |
-server |
Specifies the ColdFusion server name. |
-username |
Specifies a username defined to the JRun server. The default value is guest account. |
-password |
Specifies a password that corresponds to -username. The default value is guest account. |
-norestart |
Specifies not to restart the web server. |
-cluster |
Specifies the JRun cluster name. Use this option to define a connection to a JRun cluster instead of a single server. |
-l |
Enables verbose logging for the connector. |
-a |
Enables native OS memory allocation. |
-map .cfm,.cfc,.cfml,.cfr, |
Specifies the extension mappings list. (To use the web server connector with ColdFusion, specify .cfm, .cfc, .cfml, .cfr, .cfswf, .jsp, .jws.) |
-filter-prefix-only |
(IIS 5 only) Sets ignoresuffixmap=true in the jrun.ini file. This means that the connector module runs as an IIS extension. |
-coldfusion |
Ensures that the proper ColdFusion mappings are set (.cfm, .cfml, .cfc, .cfswf, .cfr, .jsp, .jws), and, if IIS, filter-prefix-only is implicitly specified. Always use this option when you configure a web server for use with ColdFusion. |
-upgrade |
Upgrades existing configured connectors with newer modules from a newer wsconfig.jar file. |
-service |
Specifies the Apache Windows service name. The default value is Apache. |
-bin |
Specifies the path to the Apache server binary file (apache.exe in Windows, httpd on UNIX). |
-script |
Specifies the path to the Apache UNIX control script file (apachectl, but slightly different with certain Apache variants, such as Stronghold). |
-v |
Enables verbose output from the Web Server Configuration Tool. |
-cfwebroot |
Specifies the directory corresponding to cf_root/wwwroot. If you use this option, the Web Server Configuration Tool creates web server mappings for /CFIDE and /cfdocs, each of which points to the corresponding directories under cf_root/wwwroot. This option is useful in a multihoming or hosting environment where you want multiple applications to share the ColdFusion Administrator. |
-list |
Lists all configured web servers. |
-list -host server-host |
Lists all JRun servers on the specified host. |
-remove |
Removes a configuration. Requires the -ws and either the -dir or -site options. |
-uninstall |
Uninstalls all configured connectors. |
-h |
Lists all parameters. |
Using the batch files and shell scripts
The ColdFusion server configuration includes batch files and shell scripts that implement typical command-line connector configurations. These files are in the cf_root/bin/connectors directory. For example, the IIS_connector.bat file configures all sites in IIS to site 0, which establishes a globally defined connector so that all sites inherit the filter and mappings.
If you use Apache or Sun ONE Web Server, use these files as prototypes, editing and saving them as appropriate for your site.
Command-line interface examples
This section provides examples of multiple use-cases for different web servers:
The Web Server Configuration Tool stores properties in configuration files, as follows:
The following table describes the web server connector properties in the web server configuration files. The web server connector uses these settings to help it find the ColdFusion server and know which servers to connect to.
Property |
Description |
---|---|
bootstrap |
Specifies the IP address and port on which the JRun server's proxy service is listening for connector requests. JRun must also be configured to listen on this port and address combination, the ProxyService must be activated, and the JRun server must be running. Specify ipaddress:portnumber (for example, 127.0.0.1:51011). |
serverstore |
Specifies the full path and filename of the file that contains information for the associated JRun server. The connector creates this file automatically. The default filename is jrunserver.store. |
verbose |
Creates more detailed web server log file entries for the connector. Enabling this option can cause the web server's log files to fill quickly. Specify true or false; the default value is false. In Apache and Sun ONE Web Server, the connector writes to the error log configured for the web server; on IIS, the connector writes to its own log in the related wsconfig subdirectory. |
scriptpath |
(IIS only) Points to the virtual /JRunScripts directory on the web server. |
errorurl |
(Optional) Specifies the URL to a file that contains a customized error message. This property is commented out by default. You must restart the web server after enabling this setting. |
ssl |
(Optional) Enables secure sockets layer (SSL) between the web server and the JRun server. You must set this setting to false. |
apialloc |
Enables native operating-system memory allocation rather than the web server's allocator (for use on Solaris with Sun ONE, at the direction of Adobe Support staff). |
ignoresuffixmap |
(IIS only) Forces the connector to use application mappings. |
proxyretryinterval |
Specifies the number of seconds to wait before trying to reconnect to an unreachable clustered server. |
connecttimeout |
Specifies the number of seconds to wait on a socket connect to a JRun server. |
recvtimeout |
Specifies the number of seconds to wait on a socket receive to a JRun server. |
sendtimeout |
Specifies the number of seconds to wait on a socket send to a JRun server. |
Each time you run the Web Server Configuration Tool, it creates a new configuration file and directory. For example, the first time you run the tool in the server configuration, it creates files under cf_root/runtime/lib/wsconfig/1; the second time, it creates cf_root/runtime/lib/wsconfig/2; and so on. Each of these subdirectories contains the appropriate platform-specific connector module and web-server-specific supporting files.
To help describe the web server configuration file parameters, this section provides examples of connector-specific web server properties. These examples assume that JRun and the web server are on the same computer.
The following is a typical httpd.conf file for an installation of ColdFusion on the same computer as an Apache 2.0 web server:
# JRun Settings LoadModule jrun_module "C:/coldfusion8/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 "C:/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store" JRunConfig Bootstrap 127.0.0.1:51011 #JRunConfig Errorurl <optionally redirect to this URL on errors> #JRunConfig ProxyRetryInterval <number of seconds to wait before trying to reconnect to unreachable clustered server> #JRunConfig ConnectTimeout 15 #JRunConfig RecvTimeout 300 #JRunConfig SendTimeout 15 AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf </IfModule>
For IIS, the connector uses the jrun.ini file to initialize the jrun.dll file (jrun_iis6.dll on IIS 6). The following is a typical jrun.ini file:
verbose=false scriptpath=/JRunScripts/jrun.dll serverstore=C:/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store bootstrap=127.0.0.1:51011 apialloc=false ssl=false ignoresuffixmap=true #errorurl=<optionally redirect to this URL on errors> #proxyretryinterval=<number of seconds to wait before trying to reconnect to unreachable clustered server> #connecttimeout=<number of seconds to wait on a socket connect to a JRun server> #recvtimeout=<number of seconds to wait on a socket receive to a JRun server> #sendtimeout=<number of seconds to wait on a socket send to a JRun server>
Netscape, iPlanet, or Sun ONE configuration file
The following is a typical obj.conf file for Netscape, iPlanet, or Sun ONE Web Server:
... <Object name="default"> AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true" NameTrans fn="pfx2dir" from="/mc-icons" dir="C:/Sun/WebServer6.1/ns-icons" name="es-internal" NameTrans fn="pfx2dir" from="/manual" dir="C:/Sun/WebServer6.1/manual/https" NameTrans fn="document-root" root="$docroot" PathCheck fn="nt-uri-clean" PathCheck fn="check-acl" acl="default" PathCheck fn="find-pathinfo" PathCheck fn=find-index index-names="index.jsp,index.html,home.html,index.cfm" PathCheck fn="jrunfilter" ObjectType fn=type-by-exp exp=*.jsp type="jrun-internal/ext" ObjectType fn=type-by-exp exp=*.jws type="jrun-internal/ext" 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=*.swf type="jrun-internal/ext" ObjectType fn=type-by-exp exp=*.mxml type="jrun-internal/ext" ObjectType fn=type-by-exp exp=*.cfr type="jrun-internal/ext" ObjectType fn="type-by-extension" ObjectType fn="force-type" type="text/plain" Service method=(GET|HEAD|POST) type="jrun-internal/*" fn="jrunservice" Service method="(GET|HEAD)" type="magnus-internal/imagemap" fn="imagemap" Service method="(GET|HEAD)" type="magnus-internal/directory" fn="index-common" Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file" Service method="TRACE" fn="service-trace" AddLog fn="flex-log" name="access" </Object> ...
The following is a typical magnus.conf file for Netscape, iPlanet, or Sun ONE Web Server:
... Init fn="load-modules" shlib="C:/coldfusion8/runtime/lib/wsconfig/1/jrun_nsapi.dll" funcs="jruninit,jrunfilter,jrunservice" Init fn="jruninit" serverstore="C:/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store" bootstrap="127.0.0.1:51011" verbose="true" apialloc="false" ssl="false" ignoresuffixmap="false" #errorurl="<optionally redirect to this URL on errors>" connecttimeout="15" recvtimeout="300" sendtimeout="15"