Web server configuration for application isolation

When you use multiple server instances for application isolation, the steps you perform to configure communication between the website and the server instance differ for each web server.

To enhance performance when using an external web server with multiple server instances, place all static content (HTML files and images, for example) under the web server root directory or one of its subdirectories. Minimize the amount of static content served from ColdFusion web application root directory.

Configuring application isolation in IIS

When you use multiple virtual websites with multiple server instances under IIS, you define separate filters and mappings for each virtual website and server instance combination.

It is assumed that you already created server instances and virtual websites, as described in Enabling application isolation.

Configure multiple server instances for application isolation when using IIS

Run the Web Server Configuration Tool multiple times, once for each virtual website, and specify a different site and server instance each time. Ensure that you select the Configure Web Server for ColdFusion MX Applications option (GUI) or use the ‑coldfusion option (command line). For more information on running the Web Server Configuration Tool, see Using an external web server.

Configuring application isolation in Apache

When you use multiple virtual hosts with multiple server instances under Apache, you edit the httpd.conf file manually.

It is assumed that you already created server instances and virtual websites, as described in Enabling application isolation.

Configure multiple server instances for application isolation when using Apache

  1. Run the Web Server Configuration Tool once, specifying the location of the Apache httpd.conf file and any other required information. Ensure that you select the Configure Web Server for ColdFusion MX Applications option (GUI) or use the ‑coldfusion option (command line).

  2. The Web Server Configuration Tool creates a sequentially numbered subdirectory under CF_install/config/wsconfig. You can use the subdirectory created by the Web Server Configuration Tool for one of your virtual hosts, but you must create additional subdirectories for all other virtual hosts. For example, the first time you run the Web Server Configuration Tool, it creates CF_install/config/wsconfig/1; if you have two other virtual hosts, manually create two other directories (CF_install/config/wsconfig/mystore and CF_install/config/wsconfig/myemp in this example). These directories can be empty.

  3. Restart each of the modified Tomcat servers.

  4. Open the apache_root/conf/httpd.conf file in a text editor and find the VirtualHost directives. The settings added by the Web Server Configuration Tool are after the last </IfModule> directive.

  5. Open CFInstallation\cfusion\runtime\conf\server.xml.

  6. Under host block, search for the string, “To add virtual directory.”

  7. Uncomment the entry context path below.

  8. To add a virtual directory, add the aliases attribute as shown below:

    <Context path="/" docBase="<absolute_path_to_CF_install_directory>\wwwroot" WorkDir="<cf_home>\runtime\conf\Catalina\localhost\tmp" aliases="/path1=<absolute_path_to_directory1>,/path2=<absolute_path_to_directory2>"></Context>
    Note: Alias path must include a leading ‘/’.
  9. In the original IfModule directive, remove or comment out the Serverstore and Bootstrap lines (comments start with #).

  10. Restart Apache.

  11. (Optional) Store the ColdFusion files of your application in the external web server root directory.

  12. Test the applications under each virtual host.

Note: Remember that the web server connector doesn’t serve static content, such as HTML and images. Place these files under the web root or create a web server mapping to the ColdFusion web application root.

Configuring application isolation in Sun ONE Web Server

Under Sun ONE Web Server, each ColdFusion server instance is mapped to a Sub ONE Web Server instance, when you use multiple virtual hosts with multiple server instances.

It is assumed that you already created server instances, as described in Enabling application isolation.

Configure multiple server instances for application isolation when using Sun ONE Web Server

Run the Web Server Configuration Tool for each Sun ONE Web Server instance. Specify a different configuration directory and ColdFusion server instance each time. Ensure that you select the Configure Web Server for ColdFusion MX Applications option (GUI) or use the ‑coldfusion option (command line).