Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide

ProcedureTo Configure Sun Web Server

Before You Begin

Note –

The following steps are automatically performed by the installation program for Enterprise Server. But, if you are using GlassFish v2.1, you will need to perform these steps manually.

  1. To the web server instance's magnus.conffile, add the following lines:

    ##BEGIN EE LB Plug-in Parameters
    Init fn="load-modules"
    funcs="init-passthrough,service-passthrough,name-trans-passthrough" Thread="no"
    Init fn="init-passthrough"
    ##END EE LB Plug-in Parameters=
  2. Append the following line if it does not exist already:

    Init fn="load-modules" shlib=".../" shlib_flags="(global|now)"
  3. In the file web-server-install-dir/config/obj.conf, insert the following in a single line before the first occurrence of the string nametrans:

    Nametrans fn="name-trans-passthrough" name="lbplugin"

    The order in which NameTrans entries appear in obj.conf is very important. The installer puts the NameTrans entries in the correct location, but if you are editing obj.conf for other purposes you must ensure that the order remains correct. In particular, the load balancer info must come before the document-root function. For more information on the obj.conf file, see Sun Java System Web Server 7.0 Administrator’s Configuration File Reference on

  4. Append the following lines to the file web-server-install-dir/config/obj.conf:

    <Object name = "lbplugin"> 
    ObjectType fn="force-type" type="magnus-internal/lbplugin"
    PathCheck fn="deny-existence" path="*/WEB-INF/*"
    Service type="magnus-internal/lbplugin" fn="service-passthrough"
    Error reason="Bad Gateway" fn="send-error" uri="$docroot/badgateway.html"
  5. Edit the web-server-install-dir/start script to update the LD_LIBRARY_PATH value to include app-server-install-dir/lib/lbplugin/lib.

    The app-server-install-dir/lib/lbplugin/lib directory contains binaries that the load balancer plug-in requires.

  6. (Optional) For the new DAS-based Load Balancer Administration, configure the web server for SSL.

    For detailed instructions for Web Server 6.1 , see To Set Up the HTTP Load Balancer in SSL Mode for Sun Web Server 6.1.

    For detailed instructions for Web Server 7, see To Set up the HTTP Load Balancer in SSL Mode for Sun Web Server 7 .

  7. If the web server is not already running, start the web server.