View comments | RSS feed
Contents > Configuring and Administering ColdFusion MX > Using Multiple Server Instances > Enabling application isolation > Web server configuration for application isolation Configuring application isolation in Apache PreviousNext

Configuring application isolation in Apache

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

This discussion assumes that you have already created server instances and virtual websites, as described in Enabling application isolation.

To 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.
  2. The Web Server Configuration Tool creates a sequentially numbered subdirectory under jrun_root/lib/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 jrun_root/lib/wsconfig/1; if you have two other virtual hosts, you must manually create two other directories, jrun_root/lib/wsconfig/mystore and jrun_root/lib/wsconfig/myemp directories. These directories can be empty.
  3. Open the jrun_root/servers/servername/SERVER-INF/jrun.xml file for each of your server instances, ensure that the deactivated element is set to false, and note the value of the port element for the ProxyService service. For example:
    ...
    <service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">
      <attribute name="activeHandlerThreads">25</attribute>
      <attribute name="backlog">500</attribute>
      <attribute name="deactivated">false</attribute> 
      <attribute name="interface">*</attribute>
      <attribute name="maxHandlerThreads">1000</attribute>
      <attribute name="minHandlerThreads">1</attribute>
      <attribute name="port">51002</attribute> 
    ...
    
  4. Open the apache_root/conf/httpd.conf file in a text edit and find the VirtualHost directives. The settings added by the Web Server Configuration Tool are after the last </IfModule> directive, as the following example shows:
    ...
    # JRun Settings
    LoadModule jrun_module "C:/JRun4/lib/wsconfig/1/mod_jrun20.so"
    <IfModule mod_jrun20.c>
        JRunConfig Verbose false
        JRunConfig Apialloc false
        JRunConfig Ssl false
        JRunConfig Ignoresuffixmap false
        JRunConfig Serverstore "C:/JRun4/lib/wsconfig/1/jrunserver.store"
        JRunConfig Bootstrap 127.0.0.1:51020
        #JRunConfig Errorurl <optionally redirect to this URL on errors>
        AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
    </IfModule>
    
    NameVirtualHost 127.0.0.1
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@mysite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
        ServerName SERVER02
        ErrorLog logs/error.log
    </VirtualHost>
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@mysite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs2"
        ServerName mystore
        ErrorLog logs/error-store.log
    </VirtualHost>
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@mysite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs3"
        ServerName myemployee
        ErrorLog logs/error-employee.log
    </VirtualHost>
    ...
    
  5. For each VirtualHost directive, copy the IfModule directive from its default location outside the VirtualHost directive to the last element in the VirtualHost directive.
  6. Delete the Apialloc, Ssl, and Ignoresuffixmap elements in the IfModule directive for each virtual host. Modify the Serverstore and Bootstrap elements to point to the appropriate proxy port (from the jrun.xml file) and jrun_root/lib/wsconfig/subdirectory/jrunserver.store file, which the web server connector creates automatically. Do not modify the jrun-handler line.
  7. In the original IfModule directive, remove the Serverstore and Bootstrap lines. The following example shows three virtual hosts, two of which are configured for ColdFusion MX:
    ...
    # JRun Settings
    LoadModule jrun_module "C:/JRun4/lib/wsconfig/1/mod_jrun20.so"
    <IfModule mod_jrun20.c>
        JRunConfig Verbose false
        JRunConfig Apialloc false
        JRunConfig Ssl false
        JRunConfig Ignoresuffixmap false
        #JRunConfig Serverstore "C:/JRun4/lib/wsconfig/1/jrunserver.store"
        #JRunConfig Bootstrap 127.0.0.1:51020
        AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
    </IfModule>
    NameVirtualHost 127.0.0.1
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@mysite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
        ServerName RNIELSEN02
        ErrorLog logs/error.log
    </VirtualHost>
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@mysite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs2"
        ServerName rnielsenstore
        ErrorLog logs/error-store.log
      <IfModule mod_jrun20.c>
        JRunConfig Verbose true
        JRunConfig Serverstore "C:/JRun4/lib/wsconfig/mystore/jrunserver.store"
        JRunConfig Bootstrap 127.0.0.1:51002
        AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
      </IfModule>
    </VirtualHost>
    <VirtualHost 127.0.0.1>
        ServerAdmin admin@mysite.com
        DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs3"
        ServerName rnielsenemployee
        ErrorLog logs/error-employee.log
      <IfModule mod_jrun20.c>
        JRunConfig Verbose true
        JRunConfig Serverstore "C:/JRun4/lib/wsconfig/myemp/jrunserver.store"
        JRunConfig Bootstrap 127.0.0.1:51003
        AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc
      </IfModule>
    </VirtualHost>
    ...
    
  8. Restart Apache.

Contents > Configuring and Administering ColdFusion MX > Using Multiple Server Instances > Enabling application isolation > Web server configuration for application isolation Configuring application isolation in Apache PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


bob2cam said on Apr 5, 2004 at 7:58 AM :
I tried setting up the virtual hosts dozens of times and could not get it to work. The solution turned out to be adding an index.html to the document root of the virtual host.
It seems that this directive "DirectoryIndex index.html index.html.var index.cfm" applied to the main host but not to subsequent hosts. You might be able to add the line inside the virtual host, but I haven' tried it...
fel23 said on Jan 17, 2005 at 11:13 PM :
I installed coldfusion MX is not run, my website is run by coldfusion on windows xp -please help Error need to upgrade coldfusion so I did nothing happened.
fel23 said on Jan 17, 2005 at 11:13 PM :
I installed coldfusion MX is not run, my website is run by coldfusion on windows xp -please help Error need to upgrade coldfusion so I did nothing happened.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/cluster8.htm