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\bin\connectors.

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, before you proceed, ensure that you have the options IIS Metabase and IIS 6 configuration compatibility (Internet Information Service > Web Management Tools > IIS 6 Management Compatibility) and ISAPI Extensions (Internet Information Service > Web Management Tools > World Wide Web Services > Application Development Features) 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 9 > Web Server Configuration Tool.

  2. Click Add.

  3. In the Server pop-up menu, select the host name and the server or cluster name to configure. In the ColdFusion 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.
  1. In the Web Server Properties area, select IIS and specify the website. For IIS, you typically specify All.

  2. Select the Configure web server for ColdFusion applications option, and click OK.

    Note: Omitting the previous step causes your web server to serve ColdFusion source code.
  3. 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.

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.

    Mappings for .cfm, .cfml, .cfc, .cfswf, .cfr, .jsp, and .jws are displayed in the Extension column.

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

    The following image shows a sample JRunScripts virtual directory:

  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:

    path/wsconfig/number (typically 1)

Configure SunOne/Sun Java System Web Server for ColdFusion in Windows

You configure SunOne 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.

(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 9 > Web Server Configuration Tool.

  2. Click Add.

  3. In the Server pop-up menu, select the host name and the server or cluster name to configure. For the ColdFusion 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 applications option, and click OK.

    Note: Omitting the previous step causes your web server to serve ColdFusion source code.
  6. 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.

Verify your configuration

  1. Verify that the following file was created: cf_root/runtime/lib/wsconfig/number/libjrun_nsapi.so

  2. Open SunOne configuration file, obj.conf in the webserver directory (for example in C:\sunone\servers\https-yourserver\config\obj.conf).

  3. Verify that the following was added to the file:

PathCheck fn=find-index {check index.cfm is added} 
PathCheck fn="jrunfilter" 
ObjectType fn=type-by-exp exp={*.cfm, *.cfc, *.cfswf, *.jsp, *.jws, *.cfr} type="jrun-internal/ext" 
Service method=(GET|HEAD|POST) type="jrun-internal/*" fn="jrunservice"

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.

(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.

Configure Apache for ColdFusion in Windows

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

  2. Click Add.

  3. In the Server pop-up menu, select the host name and the server or cluster name to configure. For the ColdFusion 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 applications option, and click OK.

    Note: Omitting the previous step causes your web server to serve ColdFusion source code.
  6. Copy the CFIDE and cfdocs directories from cf_root/wwwroot to your web server root directory. Also, 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.

Verify your Apache configuration

  1. Verify that one of the following files was created:

    • cf_root\runtime\lib\wsconfig\number\mod_jrun.so (Apache 1.3.2.7)

    • cf_root\runtime\lib\wsconfig\number\mod_jrun20.so (Apache 2.x)

    In the multiserver configuration, this file is located under jrun_root/lib/wsconfig.

  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.

  3. Verify that the following code is appended to this file (except that if you are using Apache 2.2, the filename is mod_jrun22.so):

# JRun Settings 
LoadModule jrun_module "c:/ColdFusion9/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:/ColdFusion9/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>