![]() ![]() ![]() |
||
|
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. This section contains the following sections:
Tip: 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.
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.
This section assumes that you already created server instances and virtual websites, as described in Enabling application isolation.
-coldfusion
option (command-line). For more information on running the Web Server Configuration Tool, see Using an external web server.When you use multiple virtual hosts with multiple server instances under Apache, you edit the httpd.conf file manually.
This section assumes that you already created server instances and virtual websites, as described in Enabling application isolation.
-coldfusion
option (command-line).
ProxyService
service, ensure that the deactivated
element is set to false, and note the value of the port element; 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>
...
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:51000 #JRunConfig Errorurl <optionally redirect to this URL on errors> #JRunConfig ProxyRetryInterval <number of seconds to wait before trying to reconnect to unreachable clustered server> #JRunConfig ConnectTimeout 15 #JRunConfig RecvTimeout 300 #JRunConfig SendTimeout 15 AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf </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> ...
VirtualHost
directive that relates to a ColdFusion server instance, copy the entire IfModule mod_jrun20.c
directive from its original location outside the VirtualHost
directive to the last element in the VirtualHost
directive.
Apialloc
, Ssl
, Ignoresuffixmap
, and AddHandler
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.
IfModule
directive, remove or comment out the Serverstore
and Bootstrap
lines (comments start with #). 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 .cfr .cfswf </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
</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
</IfModule>
</VirtualHost> ...
Note: Remember that the web server connector doesnt 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.
When using multiple virtual hosts with multiple server instances under Sun ONE Web Server, you create multiple Sun ONE Web Server instances, one for each ColdFusion server instance.
This section assumes that you have already created server instances, as described in Enabling application isolation.
-coldfusion
option (command-line). |
||
![]() ![]() ![]() |