Multihoming

You typically use the Web Server Configuration Tool to configure a connection between the web server and ColdFusion server running on the same computer. However, you can use the web server connector to route requests to multiple virtual sites to a single ColdFusion server. This is known as multihoming.

In a multihomed environment, you have multiple virtual hosts (also known as virtual sites) connected to a single ColdFusion server. You might use these virtual hosts for separate applications, such as Human Resources (HR), payroll, and marketing, or for separate users in a hosting environment.

Note: You use web-server-specific methods to create separate virtual websites for each use.

Multihoming configuration tasks include the following:

Enabling access to the ColdFusion MX Administrator If any of the applications under a virtual host need to access the ColdFusion MX Administrator, you must create a web server mapping (Alias directive in Apache) for /CFIDE that points to the original CFIDE directory. Alternatively, you can copy the entire CFIDE directory to the virtual website.

Tip: You can also configure the web server using the command-line Web Server Configuration Tool -cfwebroot option, which allows access to the CFIDE directory under the specified web root.

Enabling access to the cfform.js file If you do not create a web server mapping for /CFIDE, and any of the applications under a virtual host use the cfform tag, you must enable the virtual host to find the JavaScript files under the CFIDE/scripts directory. To enable access to the these scripts, use one of the following options:

Disabling the cacheRealPath attribute To ensure that ColdFusion MX always returns pages from the correct server, ensure that Cache Web Server Paths is disabled in t‘he Caching page of the ColdFusion MX Administrator. (When you use the multiserver configuration, set the cacheRealPath attribute to false for the ProxyService in the jrun_root/servers/servername/SERVER-INF/jrun.xml file.)

The procedures you perform to enable multihoming differ for each web server:

IIS

When you use IIS, you run the IIS Administrator to create additional websites and run the Web Server Configuration Tool. You store ColdFusion pages under the web root of each virtual website.

To connect multiple virtual sites on IIS to a single ColdFusion server:

  1. Use the IIS Administrator to create virtual websites, as necessary. The web root directory should enable read, write, and execute access. For more information, see your IIS documentation.
  2. Configure DNS for each virtual website, as described in your IIS documentation.
  3. Test each virtual website to ensure that HTML pages are served correctly.
  4. Run the Web Server Configuration Tool, as follows:
  5. Test each virtual website to ensure that ColdFusion pages are served correctly.

Apache

When you use Apache, you modify the apache_root/conf/httpd.conf file to create virtual hosts and run the Web Server Configuration Tool. You store ColdFusion pages under the web root of each virtual website.

To connect multiple Apache virtual hosts on a web server to a single ColdFusion server:

  1. Configure DNS for each virtual website, as described in your web server documentation.
  2. Open the apache_root/conf/httpd.conf file in a text editor and create virtual hosts, as necessary. For more information, see your Apache documentation. For example:
    ...
    NameVirtualHost 127.0.0.1
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@yoursite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
        ServerName SERVER02
        ErrorLog logs/error.log
    </VirtualHost>
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@yoursite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs2"
        ServerName mystore
        ErrorLog logs/error-store.log
    </VirtualHost>
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@yoursite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs3"
        ServerName myemployee
        ErrorLog logs/error-employee.log
    </VirtualHost>
    ...
    
  3. Test each virtual host to ensure that HTML pages are served correctly.
  4. Run the Web Server Configuration Tool, as follows:

    The Web Server Configuration Tool updates the httpd.conf file. For a sample, see Apache.

  5. Restart Apache. You store ColdFusion files for each virtual host in the directory specified by the DocumentRoot directive.
  6. Test each virtual host to ensure that ColdFusion pages are served correctly.

Sun ONE Web Server, iPlanet, and Netscape

When you use Sun ONE Web Server version 6, you use the Server Administrator to create virtual servers and run the Web Server Configuration Tool. You store ColdFusion pages under the web root of each virtual server.

Note: For earlier versions of Sun ONE/iPlanet and Netscape Enterprise Server (NES), you must create separate server instances for each site and run the Web Server Configuration Tool once for each site.

To connect multiple Sun ONE Web Server virtual hosts to a single ColdFusion server:

  1. Using the Sun ONE Web Server Administrator, create virtual web servers for use by ColdFusion MX. For more information, see your Sun ONE Web Server documentation.
  2. Configure DNS for each virtual website, as described in your web server documentation.
  3. Test each virtual server to ensure that HTML pages are served correctly.
  4. Run the Web Server Configuration Tool, as follows:
  5. Test each virtual server to ensure that ColdFusion pages are served correctly.