Configuring web servers

This section describes how to configure a web server to serve ColdFusion pages, for Windows and UNIX. Do this if you did not configure a web server automatically during installation, to change your web server, or to configure a web server for a cluster.

You configure an external web server connection using the Web Server Configuration Tool, which you can run either through a graphical user interface (GUI) or the command line. The Windows discussions describe GUI mode, and the UNIX instructions describe command-line mode; however, you can use GUI mode on UNIX if you have access to a graphical environment.

Tip: ColdFusion MX 7 provides batch files and shell scripts in the cf_root/bin/connectors directory to help you get started with command-line usage.

For more information on the Web Server Configuration Tool, including information on multihoming and distributed usage, see Configuring and Administering ColdFusion MX.

Note: If you cannot verify your configuration, repeat the procedure. If the problem persists, contact Macromedia Technical Support for assistance, or manually create the element that you cannot verify in the configuration (for example, manually add an entry to the Apache httpd.conf file, as described in this section).

Configuring web servers in Windows

This section explains how to configure the following web servers in Windows:

Configuring IIS in Windows

This section describes how to configure IIS for ColdFusion MX in Windows, and how to verify your configuration. You configure IIS using the Web Server Configuration Tool in either GUI or command-line mode. This discussion describes how to use GUI mode.

Tip: (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 chapter in Configuring and Administering ColdFusion MX.

To configure IIS for ColdFusion MX 7 in Windows:

  1. Start the Web Server Configuration Tool by selecting Start > Programs > Macromedia > ColdFusion MX 7 > Web Server Configuration Tool.
  2. Click Add.
  3. In the Server drop-down list box, select the host name and the server or cluster name that you want to configure. In the ColdFusion MX 7 server configuration, the server name is always coldfusion. Clustering support is not available on the server configuration.

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

  4. In the Web Server Properties area, select IIS and specify the website. For IIS, you typically specify All.
  5. Select the Configure web server for ColdFusion MX applications option.

    Caution: Omitting the previous step causes your web server to serve ColdFusion MX 7 source code.

  6. Click OK.
  7. Copy the CFIDE and cfdocs directories from cf_root/wwwroot to your web server root directory. In addition, copy your application's CFM pages from cf_root/wwwroot to your web server root directory. In the multiserver configuration, these files are under the jrun_root/servers/cfusion/cfusion-ear/cfusion-war directory.

To verify your IIS configuration:

  1. Verify that the following file was created: cf_root/runtime/lib/wsconfig/jrun.dll (server configuration) or jrun_root/lib/wsconfig/jrun.dll (multiserver configuration). On IIS6, this file is named jrun_iis6.dll.
  2. For each of your IIS websites, verify that application mappings for .cfm, .cfml, .cfc, .cfswf, .cfr, .jsp, and .jws were added, as follows:
    1. In IIS, right-click an IIS website and select Properties.
    2. In the Properties dialog box, on the Home Directory tab, click Configuration.
    3. In the Application Configuration dialog box, click the App Mappings tab.
    4. You should see mappings for .cfm, .cfml, .cfc, .cfswf, .cfr, .jsp, and .jws in the Extension column.

  3. Verify that each of your IIS websites has a virtual directory called JRunScripts.

    The following figure shows a sample JRunScripts virtual directory:


    The IIS virtual directory for ColdFusion MX, called JRunScripts

  4. Verify that the JRunScripts directory in each of your IIS websites points to the correct location, as follows:
    1. Right-click the JRunScripts directory and select Properties.
    2. In the Properties dialog box, on the Virtual Directories tab, verify that the Local Path text box contains the following path:
    3. path/wsconfig/number (typically 1)

Configuring SunONE Web Server or iPlanet web server in Windows

This section describes how to configure SunONE Web Server 6 or iPlanet web server 6.x for ColdFusion MX 7 in Windows, and how to verify your configuration. You configure SunONE or iPlanet using the Web Server Configuration Tool in either GUI or command-line mode. This discussion describes how to use GUI mode.

Tip: (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 chapter of Configuring and Administering ColdFusion MX.

To configure SunONE or iPlanet for ColdFusion MX 7 in Windows:

  1. Start the Web Server Configuration Tool by selecting Start > Programs > Macromedia > ColdFusion MX 7 > Web Server Configuration Tool.
  2. Click Add.
  3. In the Server drop-down list box, select the host name and the server or cluster name to configure. For the ColdFusion MX 7 server configuration, this is always coldfusion. Clustering support is not available on the server configuration.

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

  4. In the Web Server Properties area, select SunONE Web Server (iPlanet) or Netscape Enterprise Server (NES), and specify the path to the directory that contains the obj.conf file.
  5. Select the Configure web server for ColdFusion MX applications option.

    Caution: Omitting the previous step causes your web server to serve ColdFusion MX 7 source code.

  6. Click OK.
  7. Copy the CFIDE and cfdocs directories from cf_root/wwwroot to your web server root directory. In addition, copy your application's CFM pages from cf_root/wwwroot to your web server root directory. In the multiserver configuration, these files are under the jrun_root/servers/cfusion/cfusion-ear/cfusion-war directory.

To verify your SunONE or iPlanet configuration:

  1. Verify that the following file was created: cf_root/runtime\lib\wsconfig\number\jrun_nsapi35.dll (server configuration) or jrun_root/lib/wsconfig/number/jrun_nsapi35.dll (multiserver configuration).
  2. Open the SunONE configuration file, obj.conf, in the web server directory (for example, in C:\iPlanet\Servers\https-yourserver\config\obj.conf).
  3. Verify that the following line was added to the file:
    NameTrans fn="jrunfilter"
    
  4. Verify that #JRun prefixes the following NameTrans line in the file:
    #JRun NameTrans fn="pfx2dir" from="/servlet" 
    dir="$docroot/servlet" name="ServletByExt"
  5. Verify that the following object element is at the end of the file:
    <Object name="jrun">
    PathCheck fn="jrunfilter"
    Service fn="jrunservice"
    </Object>
    

Configuring Apache web server in Windows

This section describes how to configure the Apache web server for ColdFusion MX 7 in Windows, and how to verify your configuration. You configure Apache using the Web Server Configuration Tool in either GUI or command-line mode. This discussion describes how to use GUI mode.

Tip: (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 chapter in Configuring and Administering ColdFusion MX.

To configure Apache for ColdFusion MX 7 in Windows:

  1. Start the Web Server Configuration Tool by selecting Start > Programs > Macromedia > ColdFusion MX 7 > Web Server Configuration Tool.
  2. Click Add.
  3. In the Server drop-down list box, select the host name and the server or cluster name to configure. For the ColdFusion MX 7 server configuration, this is always coldfusion. Clustering support is not available on the server configuration.

    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.
  5. Select the Configure web server for ColdFusion MX applications option.

    Caution: Omitting the previous step causes your web server to serve ColdFusion MX 7 source code.

  6. Click OK.
  7. Copy the CFIDE and cfdocs directories from cf_root/wwwroot to your web server root directory. In addition, copy your application's CFM pages from cf_root/wwwroot to your web server root directory. In the multiserver configuration, these files are under the jrun_root/servers/cfusion/cfusion-ear/cfusion-war directory.

To verify your Apache configuration:

  1. Verify that one of the following files was created:
  2. Open the Apache configuration file, httpd.conf, in your Apache conf directory. In Windows, the default is C:\Program Files\Apache Group\Apache\conf\httpd.conf.

    Verify that the following code is appended to this file:

    # JRun Settings
    LoadModule jrun_module "c:/CFusionMX7/runtime/lib/wsconfig/1/mod_jrun.so"
    <IfModule mod_jrun.c>
      JRunConfig Verbose false
      JRunConfig Apialloc false
      JRunConfig Ssl false
      JRunConfig IgnoreSuffixmap false
      JRunConfig Serverstore 
    "c:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store"
      JRunConfig Bootstrap 127.0.0.1:51000
      #JRunConfig Errorurl <optionally redirect to this URL on errors>
      JRunConfig jrun-handler .jsp .jws .cfm .cfml .cfc .cfswf .cfr
    </IfModule>
    

View comments in LiveDocs