View comments | RSS feed

Multihosting with JRun

The "Connecting multiple JRun servers to one web server" discussion describes a simple scenario in which you establish virtual hosts to enable a single web server to communicate with multiple JRun servers. A more complex variant of this scenario is multihosting. Multihosting is when an Internet Service Provider (ISP) or other similar entity provides access to separate domains by establishing multiple virtual hosts on a single web server. You typically create a separate JRun server for each virtual host, which has the following benefits:

The following figure shows a simplified multihosting configuration, in which one computer is running a single web server. That web server has three virtual hosts, each of which has its own JRun server.

One web server with three virtual hosts, each with its own JRun server

When you set up multiple virtual hosts on a single web server, you must take special steps to connect JRun to those hosts. The following section describes techniques for multihosting with popular web servers.

Note:   This is not the same as multihoming, which involves separate IP addresses resolving to different physical hosts on the same web server.

Multihosting with Apache

To set up Apache virtual hosts, each with its own JRun server, include a JRun configuration block inside each VirtualHost directive in the Apache configuration file (httpd.conf).

The following listing shows an example of the JRun configuration information within the VirtualHost directive. The LoadModule statement is outside any VirtualHost directives because you can reference it only once at the global level.

LoadModule jrun_module136 "/opt/JRun/connectors/apache/intel-linux/mod_jrun.so"
<VirtualHost 127.0.0.1>
ServerAdmin webmaster@localhost
DocumentRoot /usr/local/apache/htdocs/localhost
ServerName newhost
ErrorLog logs/newhost-error_log
CustomLog logs/newhost-access_log common
# JRun Settings <IfModule mod_jrun.c> JRunConfig Verbose false </IfModule> </VirtualHost>

In addition to editing the httpd.conf file, you must also configure the JRun servers of each virtual host to use a unique proxy port.

To multihost with Apache:

  1. Create a new Apache virtual host.
  2. Create a new JRun server using the JMC. For this procedure, assume the new JRun server is called newhost.

    Each virtual host must have a unique JCP port that matches the ProxyPort property in the VirtualHost directive. For information on JRun port usage, see "JRun ports".

  3. Disable the newhost JWS by removing the web service from the servlet.services property in local.properties:
    # was: servlet.services=jndi,jdbc,{servlet.webapps},jcp,web
    servlet.services=jndi,jdbc,{servlet.webapps},jcp
    
  4. Run the Web Server Configuration tool on the web server machine. In the Add Web Server configuration panel, select the JRun server in the top portion and Apache and the Apache configuration directory in the bottom portion.
  5. Edit httpd.conf and move the JRun settings block within the applicable VirtualHost directive. If necessary, the JRun settings block can be copied to more than one VirtualHost directive and the settings modified.

When the Apache connector with the specified directory is removed, all instances of the JRun Settings block and the LoadModule statements are removed so there are no JRun settings in the conf file. If not all the JRun VirtualHost sections should be removed, you should remove the applicable one manually.

Multihosting with IIS

You can set up multiple virtual servers only with Microsoft IIS 4.0 and higher. Also, note that not all Windows platforms ship a version of IIS that supports multiple hosts.

To multihost with IIS:

  1. Using the Microsoft Management Console (MMC), Internet Services Manager, create the new IIS website (also called virtual host).
  2. Create a new JRun server using the JMC. For this procedure, assume the new JRun server is called newserver.
  3. (Optional) Disable the newserver JRun web server as described in "Turning off the JWS".
  4. Restart the JRun server.

    The JRun server must be running to run the Web Server Configuration tool.

  5. Run the Web Server Configuration tool on the web server machine. In the Add Web Server Configuration panel, select the JRun server in the top portion and the new IIS website in the bottom portion.

    Note:   Ensure that the JRun filter is not installed globally when you are setting up multihosting. Use the Internet Service Manager control panel to see if the JRun filter was installed globally.

Multihosting with Netscape

Netscape requires a new web server instance for each virtual host.

To multihost with Netscape:

  1. Create a new web server instance for each virtual host.
  2. Create a new JRun server using the JMC. For this procedure, assume the new JRun server is called newserver.
  3. Start the JRun server.

    The JRun server must be running to run the Web Server Configuration tool.

  4. (Optional) Disable the newserver JWS, as described in "Turning off the JWS".
  5. Run the Web Server Configuration tool on the web server machine. In the Add Web Server Configuration panel, select the JRun server in top portion and the new web server instance in the bottom portion.
  6. Restart the Netscape server.

Comments


dugsmith said on Jul 12, 2002 at 12:15 AM :
This description refers to JRun 3, not JRun 4 configuration. I'd like to see this updated, so that I can know the best practice for configuration of multiple Apache VirtualHosts with multiple JRun4 servers.

Thanks,

Doug
rnielsen said on Apr 24, 2003 at 9:39 AM :
The correct procedure for Apache is described in the Service Pak 1 Guide: http://livedocs.macromedia.com/jrun4docs/JRun_Service_Pack_1_Guide/4relnotes4.jsp

 

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

Current page: http://livedocs.adobe.com/jrun/4/JRun_Administrators_Guide/connectors8.htm