Configuring web servers in Windows

You configure web servers in Windows by doing the following:

  • Configuring IIS in Windows

  • Configuring Sun Java System Web Server in Windows

  • Configuring Apache web server in Windows

Configuring IIS in Windows

You configure IIS using the Web Server Configuration Tool in GUI or command-line mode. This discussion describes how to use GUI mode.

(Server configuration only) To use the command line, open the batch files located in cf_root\cfusion\bin\connectors or by navigating to <ColdFusion_Home>\runtime\bin directory.

For more information, see the Web Server Management chapter in the Configuring and Administering ColdFusion guide.

Configure IIS for ColdFusion in Windows

Note: If you are configuring IIS 7 or IIS 7.5, before you proceed, ensure that you have the options ISAPI Extensions (Internet Information Service > Web Management Tools > World Wide Web Services > Application Development Features), ASP.NET , and CGI selected in the Windows Features dialog box (Start > Control Panel > Programs and Features > Turn Windows features on or off).
  1. Start the Web Server Configuration Tool by selecting Start > Programs > Adobe > ColdFusion 10 > Web Server Configuration Tool.

  2. Click Add.

  3. In the Server pop-up menu, enter the host name and the cluster name to configure.

Note: The server or cluster does not have to reside on the web server computer.

 In the Web Server Properties area, select IIS and specify the website. For IIS, you typically specify All.

Verify your IIS configuration

  1. Verify that the following folder was created: cf_root/config/wsconfig/number.

  2. To set the connectionpooltimeout and reuseconnectioncount click on Advanced Setting tab. The option to enable buffering and verbose debugging is available on the same page.

Configuring IIS:

  • Creates a folder 1 in cfroot\config\wsconfig, that contains all connector-related files.

  • Creates a virtual directory Jakarta in cfroot\config\wsconfig (in IIS).

  • Adds an entry, tomcat, under the ISAPI FILTERS. This points to cfroot\config\wsconfig\1\isapi_redirect.dll.

  • Adds an entry, tomcat, to  cfroot\config\wsconfig\1\isapi_redirect.dll with permission allowed under ISAPI and CGI Restrictions. It is applicable for global sites in IIS manager.

  • Adds the following isapi handlers: cfcHandler, cfmHandler, cfmlHandler, cfrHandler, and cfswfHandler.

  • For debugging issues, set the log level to debug, in the isapi_redirect.properties file present in the cfroot\config\wsconfig\1\ directory.

  • To disable webserver buffer, change the is_buffer_enable to false in the cfroot\config\wsconfig\1\isapi_redirect.properties file. Disable webserver buffer if you want cfflush to work over an IIS connector. If your application does not use cfflush, set it to true for increase in the performance.

Configure Sun Java System Web Server for ColdFusion in Windows

You configure Sun Java Web Server 6.x/Sun Java System Web Server 7 for ColdFusion in Windows, and verify your configuration, by using the Web Server Configuration Tool in GUI or command-line mode. This discussion describes how to use GUI mode.

Note: On Windows, only 32-bit Sun ONE is available.
Note: (Server configuration only) To use the command line, open the batch files located in cf_root/bin/connectors.

For more information, see the Web Server Management topic in the Configuring and Administering ColdFusion guide.

  1. Start the Web Server Configuration Tool by selecting Start > Programs > Adobe > ColdFusion 10 > Web Server Configuration Tool.

  2. Click Add.

  3. In the Server pop-up menu, enter the host name and the cluster name to configure.

    Note: The server or cluster does not have to reside on the web server computer.
  4. In the Web Server Properties area, select Sun Java Web Server (iPlanet), and specify the path to the directory that contains the obj.conf and magnus.conf files.

Verify your configuration

  1. Verify that the following folder was created: cf_root/config/wsconfig/number.

  2. To set the connectionpooltimeout and reuseconnectioncount click on Advanced Setting tab. The option to enable verbose debugging also is available on this page.

Configuring Sun ONE:

Note: On Windows and Linux 64-bit, only 32-bit Sun ONE is available. While using a 64-bit configurator, provide 32-bit Sun ONE properties.
  • Creates a folder 1 in the config\wsconfig folder that contains all connector-related files.

  • Adds the following entry in the magnus.conf file of Sun ONE. Change the log level to debug for debugging issues.

    Init fn="load-modules" shlib="C:/ColdFusion10/config/wsconfig/1/nsapi_redirect.dll" funcs="jk_init,jk_service" 
    Init fn="jk_init" worker_file="C:/ColdFusion10/config/wsconfig/1/workers.properties" log_level="info" log_file="C:/ColdFusion10/config/wsconfig/1/nsapi.log" shm_file="C:/ColdFusion10/config/wsconfig/1/jk_shm"
  • Adds the entries for all extensions in the obj.conf file of Sun ONE. For example,

    NameTrans fn="assign-name" from="/*.cfc/*" name="jknsapi" 
    NameTrans fn="assign-name" from="/*.cfc" name="jknsapi" 
    NameTrans fn="assign-name" from="/*.cfml" name="jknsapi" 
    <Object name="jknsapi"> 
    Service fn="jk_service" method="*" worker="server1" 
    </Object>
Note: 64-bit Sun One and iPlanet WebServer are not supported on 64-bit Windows machines.

Configuring Apache web server in Windows

You configure Apache by using the Web Server Configuration Tool in GUI or command-line mode. This discussion describes how to use GUI mode.

Note: To configure Apache connector in UNIX platforms, APXS installation is a prerequisite.
(Server configuration only) To use the command line, open the batch files located in cf_root\cfusion\bin\connectors.

For more information, see the Web Server Management topic in the Configuring and Administering ColdFusion guide.

Configure Apache for ColdFusion in Windows

  1. Start the Web Server Configuration Tool by selecting Start > Programs > Adobe > ColdFusion 10 > Web Server Configuration Tool.

  2. Click Add.

  3. In the Server pop-up menu, enter the host name and the cluster name to configure.

    Note: The server or cluster does not have to reside on the web server computer.
  4. In the Web Server Properties area, select Apache and specify the path to the directory that contains the httpd.conf file.

Verify your Apache configuration

 Verify that one of the following files was created:
  • cf_root\config\wsconfig\number

Configuring Apache:

Note: To configure Apache connector in UNIX platforms, APXS installation is a prerequisite.
Note: Configuring Apache is not supported on Mac 10.5.
  • Creates a folder 1 in cfroot\config\wsconfig that contains all connector-related files.

  • Creates a file mod_jk.conf in Apache_root_folder\conf. This file has paths to all files in the cfroot\config\wsconfig\1 directory.

  • Adds an entry in the httpd.conf file of Apache to include mod_jk.conf.

  • The following files are significant:

    • uriworkermap.properties: Mapped extensions based on which the connector forwards requests to Tomcat.

    • mod_jk.conf: Contains paths to all files in the \config\wsconfig\1 directory.

      Change the entry JKloglevel info to JKloglevel debug for debugging purposes.

    Note: For virtual host configuration, add the following entry in each of the virtual blocks: JkMountFile "cfroot\config\wsconfig\1\uriworkermap.properties:".

Configure Apache virtual host for each ColdFusion instance:

Assume that you have two instances: cfusion and server1.
  1. Configure Apache webserver for cfusion instance using the wsconfig tool.

    This step creates the connector-related files in the cfroot\config\wsconfig\1 folder. It also creates the mod_jk.conf in the <Apacheroot>\conf folder. The mod_jk.conf file is included in the httpd.conf.

  2. Configure Apache virtual hosts.
    1. In workers.properties of cfroot\config\wsconfig\1, add server1 to workers.list. For example, worker.list=cfusion,server1.

    2. Add the following block of code:
      worker.server1.type=ajp13
      worker.server1.host=localhost
      worker.server1.port=8014
      Note: The port is the AJP port for server1 and that can be found in server1.server.xml in the cfroot\server1\runtime\conf\server.xml.
    3. Copy the content of uriworkermap.properties in cfroot\config\wsconfig\1 to uriworkermap1.properties. Replace the cfusion with server1.

    4. Now add the following line in each of the virtual host: For example, VH1 is the ColdFusion instance. It should have: JkMountFile "cfroot\config\wsconfig\1\uriworkermap.properties" VH2 is the server1 instance. It should have JkMountFile "cf_root\config\wsconfig\1".