Skip Headers
Oracle® Identity Manager Installation and Configuration Guide for JBoss Application Server
Release 9.1.0.1

Part Number E14046-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

B Configuring Apache Proxy Plugin

To set up the Apache Web Server for JBoss Application Server, perform one of the following procedures:

Note:

These instructions are given for reference purpose only. For detailed information about setting up the Apache Web Server for JBoss Application Server, see Apache or JBOSS documentation.

B.1 Setting Up the Apache Web Server for JBoss Application Server on Microsoft Windows

To set up the Apache Web server on Microsoft Windows:

See Also:

The Apache Web site for detailed instructions
  1. Download the latest distribution package for the Apache2 Web server, and then install the Apache server in a directory that this document henceforth refers to as APACHE_HOME.

  2. Download the latest distribution package mod_jk 1.2.x from the Tomcat connector section page on the Tomcat Web site.

  3. Copy the library named mod_jk.so to the APACHE_HOME\modules directory.

  4. Set up Apache to use modjk by adding the following line (and the accompanying comment line) as the last line of the APACHE_HOME\conf\httpd.conf file:

    # Include mod_jk configuration file

    Include conf/mod_jk.conf

  5. In the APACHE_HOME\conf directory, create a configuration file to forward requests to JBoss Application Server instances.

    Name this file mod_jk.conf and copy the following lines into it:

    # Load mod_jk module
         # Specify the filename of the mod_jk lib
         LoadModule jk_module modules/mod_jk.so
         # Where to find workers.properties
         JkWorkersFile conf/workers.properties
         # Where to put jk logs
         JkLogFile logs/mod_jk.log
          # Set the jk log level [debug/error/info]
         JkLogLevel info 
         # Select the log format
         JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"
         # JkOptions indicates to send SSK KEY SIZE
         JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
         # JkRequestLogFormat
         JkRequestLogFormat "%w %V %T"       
         # Mount your applications
         JkMount /application/* loadbalancer
         # You can use external file for mount points.
         # It will be checked for updates each 60 seconds.
         # The format of the file is: /url=worker
         # /examples/*=loadbalancer
         JkMountFile conf/uriworkermap.properties               
         # Add shared memory.
         # This directive is present with 1.2.10 and
         # later versions of mod_jk, and is needed for
         # for load balancing to work properly
         JkShmFile logs/jk.shm             
         # Add jkstatus for managing runtime data
         <Location /jkstatus/>
         JkMount status
         Order deny,allow
         Deny from all
         Allow from all
         </Location>  
    
  6. Review the directive descriptions given in the following directory on the Apache Tomcat Connector Documentation Index Web site.

    Apply the guidelines related to the Apache cache size.

    In the APACHE_HOME\conf directory, create a file named workers.properties and populate it with the following lines:

    # Define list of workers that will be used
    # for mapping requests
    worker.list=loadbalancer,status
    # Define Node1
    # modify the host as your host IP or DNS name.
    worker.node1.port=8009
    worker.node1.host=IP of node1
    worker.node1.type=ajp13
    worker.node1.lbfactor=1
    # worker.node1.local_worker=1 (1)
    worker.node1.cachesize=10
    # Define Node2
    # modify the host as your host IP or DNS name.
    worker.node2.port=8009
    worker.node2.host= IP of node2
    worker.node2.type=ajp13
    worker.node2.lbfactor=1
    # worker.node2.local_worker=1 (1)
    worker.node2.cachesize=10
    # Load-balancing behavior
    worker.loadbalancer.type=lb
    worker.loadbalancer.balance_workers=node1,node2
     
    worker.loadbalancer.sticky_session=0
     
    # worker.loadbalancer.local_worker_only=1
    # worker.list=loadbalancer
    
  7. If your JBoss Application Server cluster contains more than two nodes, then you must add extra lines to the workers.properties file in the APACHE_HOME\conf directory.

    For example, if you have three nodes, you must add the following lines:

    # modify the host as your host IP or DNS name.
           worker.node3.port=8009
           worker.node3.host= IP of node3
           worker.node3.type=ajp13
           worker.node3.lbfactor=1
         # worker.node3.local_worker=1 (1)     
       worker.node3.cachesize=10
    

    For each subsequent node, you must add the preceding group of lines again and change all references to node3, node4, node5, and so on.

  8. In the APACHE_HOME\conf directory, create the uriworkermap.properties file, which will hold the URL mappings Apache forwards to Tomcat.

    This file enables mod_jk to forward to Tomcat requests from /mx-console, /web-console, /xlWebApp, /xlScheduler as well as /Nexaweb. The syntax for each line is /url=worker_name. Copy the following example into the file you create:

    # Simple worker configuration file
         # Mount the Servlet context to the ajp13 worker
         /jmx-console=loadbalancer
         /jmx-console/*=loadbalancer
         /web-console=loadbalancer
         /web-console/*=loadbalancer
         /xlWebApp=loadbalancer
         /xlWebApp/*=loadbalancer
         /xlScheduler=loadbalancer
         /xlScheduler/*=loadbalancer
         /Nexaweb=loadbalancer
         /Nexaweb/*=loadbalancer
    
  9. To start Apache, navigate to the APACHE_HOME\bin directory and then run the Apache.exe file.

B.2 Setting Up the Apache Web Server for JBoss Application Server on UNIX

To set up the Apache Web server on UNIX:

See Also:

The Apache Web site for detailed instructions
  1. Download the binary file for Apache 2.0 for UNIX from the Apache Web site.

  2. Run the following commands to install Apache:

    1. tar xvfz httpd-2.0.54.tar.gz

    2. cd httpd-2.0.54

    3. ./configure --prefix=/opt/apache2 --enable-module=so

    4. make

    5. make install

  3. Download the jakarta-tomcat-connectors-1.2.14-src.tar.gz file from the Apache Software Foundation Web site.

  4. Run the following commands to install the connector:

    1. tar xzvf jakarta-tomcat-connectors-1.2.14-src.tar.gz

    2. cd jakarta-tomcat-connectors-1.2.14-src/jk/native

    3. chmod 755 buildconf.sh

    4. ./buildconf.sh

    5. ./configure --with-apxs=/opt/apache2/bin/apxs

    6. make

    7. make install

    8. cd / jakarta-tomcat-connectors-jk1.2.14-src/jk/native/apache-2.0/

    9. cp mod_jk.so /opt/apache2/modules/

  5. Perform Steps 4 through 8 in the procedure described in "Setting Up the Apache Web Server for JBoss Application Server on Microsoft Windows".

  6. Navigate to the APACHE_HOME/bin/ directory, and then run the following command:

    ./apachectl start