Configuring Apache with JEUS

Configuring Windows Apache 2.0/2.2 with Windows JEUS

Installing PowerServer Web Component to the Apache document root

Run the Appeon setup program and install PowerServer Web Component to the document root of the Apache HTTP Server, for example, %Apache%\htdocs\.

If you have installed PowerServer Web Component to another location, then you should copy the entire appeon folder from the installation directory of PowerServer Web Component to the Apache document root.

Configuring Ajp13 Listener in JEUS Web Manager
  1. Start JEUS and log into JEUS Web Manager. Select Nodename | Engine Containers | Node name_container1 | Engines | Servlet Engine | MyGroup in the left treeview. Nodename indicates the node name of JEUS.

  2. Click Web Listener on the right page of JEUS Web Manager.

  3. On the Web Listener page, click Creating a new Web Listener.

  4. On the Listener Type page, select Ajp13 and click Next.

  5. On the General page, specify Listener ID and Port, for example, Listener ID: ajp13, Port: 8009, and click Next.

  6. On the Thread Pool page, specify Min, for example, Min: 2, and click Next.

  7. Click Create to create the listener. A message box will pop up and indicate whether the listener has been successfully created.

Modifying WEBMain.xml (for load balancing)
  1. Locate the WEBMain.xml file in the %JEUS_HOME%\config\nodename\nodename_servlet_engine1. nodename indicates the node name of JEUS.

  2. Change the following script in the WEBMain.xml file.

    Original script:

    <session-cluster>
    <session-routing>false</session-routing>
    </session-cluster

    Change to:

    <session-cluster>
    <session-routing>true</session-routing>
    </session-cluster>
Installing the redirector plug-in
  1. Download the plug-in file from the Apache Website (http://archive.apache.org/dist/jakarta/tomcat-connectors/jk/binaries). For example, the plug-in file for Apache 2.0.54 is mod_jk-1.2.10-apache-2.0.53.so.

  2. Place the plug-in file in the %APACHE%\modules folder and rename it mod_jk.so.

Configuring the httpd.conf file
  1. Open the httpd.conf file in the %Apache%\conf directory.

  2. Add the following script to the httpd.conf file.

    For single PowerServer:

    ##################################################################
    # JEUS Plug-In
    ##################################################################
    # 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"
    
    #redirect
    JkMount /AEM node1
    JkMount /AEM/* node1
    JkMount /servlet node1
    JkMount /servlet/* node1

    For multiple PowerServer implementing load balancing:

    ##################################################################
    #                      JEUS Plug-In
    ##################################################################
    # 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"
    
    #redirect
    JkMount /AEM cluster
    JkMount /AEM/* cluster
    JkMount /servlet cluster
    JkMount /servlet/* cluster
Creating the workers.properties file
  1. Create the workers.properties file in the %APACHE%\conf folder.

  2. Add the following scripts to it.

    For single PowerServer:

    # Define Node1
    worker.list=node1
    worker.node1.port=8009
    worker.node1.host=192.0.2.217
    worker.node1.type=ajp13
    worker.node1.lbfactor=1
    #worker.node1.local_worker=1 (1)
    worker.node1.cachesize=200

    For multiple PowerServer implementing load balancing:

    The following script example shows that there are two JEUS application servers participating in load balancing, and their node names are jiangzepeng and zhangjungang respectively. You can replace them with the real node names of JEUS application servers and add similar scripts to involve other JEUS application servers.

    worker.list=jiangzepeng_servlet_engine1,zhangjungang_servlet_engine1,cluster
    worker.cluster.type=lb
    worker.cluster.balance_workers=jiangzepeng_servlet_engine1,zhangjungang_servlet_engine1
    worker.jiangzepeng_servlet_engine1.port=8009
    worker.jiangzepeng_servlet_engine1.host=192.168.168.35
    worker.jiangzepeng_servlet_engine1.type=ajp13
    worker.jiangzepeng_servlet_engine1.lbfactor=1
    worker.jiangzepeng_servlet_engine1.cachesize=200
    worker.zhangjungang_servlet_engine1.port=8009
    worker.zhangjungang_servlet_engine1.host=192.168.168.217
    worker.zhangjungang_servlet_engine1.type=ajp13
    worker.zhangjungang_servlet_engine1.lbfactor=1
    worker.zhangjungang_servlet_engine1.cachesize=200

    For detailed information on how to configure the directives in workers.properties, visit http://tomcat.apache.org/connectors-doc/reference/workers.html.

Creating the easerverinit.conf file (for load balancing)

Create the easerverinit.conf file in the %Apache%\conf directory and add the following scripts:

# The redirector log file level.
#
# This directive determines the amount of redirector logging that is sent 
# to the Web server log file
# You must also set the logging level for the Apache Web server in the httpd.conf 
# file to either "info" or "error" for the redirector to produce any logging. 
# The syntax is:
#
# LogLevel [ debug | info | notice | warn | error | crit ] 
#
Connector.LogLevel inform
Restarting Apache and JEUS

Restart Apache and JEUS to make the settings effective.

Configuring Windows Apache 1.3 with Windows JEUS

Installing PowerServer Web Component to the Apache document root

Run the Appeon setup program and install PowerServer Web Component to the document root of the Apache HTTP Server, for example, %Apache%\htdocs\.

If you have installed PowerServer Web Component to another location, then you should copy the entire "appeon" folder from the installation directory of PowerServer Web Component to the Apache document root.

Configuring Ajp13 Listener in JEUS Web Manager
  1. Start JEUS and log into JEUS Web Manager. Select Nodename | Engine Containers | Node name_container1 | Engines | Servlet Engine | MyGroup in the left treeview. Nodename indicates the node name of JEUS.

  2. Click Web Listener on the right page of JEUS Web Manager.

  3. On the Web Listener page, click Creating a new Web Listener.

  4. On the Listener Type page, select Ajp13 and click Next.

  5. On the General page, specify Listener ID and Port, for example, Listener ID: ajp13, Port: 8009, and click Next.

  6. On the Thread Pool page, specify Min, for example, Min: 2, and click Next.

  7. Click Create to create the listener. A message box will pop up and indicate whether the listener has been successfully created.

Modifying WEBMain.xml (for load balancing)
  1. Locate the WEBMain.xml file in the %JEUS_HOME%\config\nodename\nodename_servlet_engine1. nodename indicates the node name of JEUS.

  2. Change the following script in the WEBMain.xml file.

    Original script:

    <session-cluster>
    <session-routing>false</session-routing>
    </session-cluster>

    Change to:

    <session-cluster>
    <session-routing>true</session-routing>
    </session-cluster> 
Installing the redirector plug-in
  1. Download the plug-in file from the Apache Website (http://archive.apache.org/dist/jakarta/tomcat-connectors/jk/binaries). For example, the plug-in file for Apache 1.3.33 is mod_jk-1.2.10-apache-1.3.33.so.

  2. Place the plug-in file in the %APACHE%\modules folder and rename it mod_jk.so.

Configuring the httpd.conf file
  1. Open the httpd.conf file in the %Apache%\conf directory.

  2. Add the following script to the httpd.conf file.

    For single PowerServer:

    ##################################################################
    # JEUS Plug-In
    ##################################################################
    # 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"
    
    #redirect
    JkMount /AEM node1
    JkMount /AEM/* node1
    JkMount /servlet node1
    JkMount /servlet/* node1

    For multiple PowerServer implementing load balancing:

    ##################################################################
    #                      JEUS Plug-In
    ##################################################################
    # 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"
    
    #redirect
    JkMount /AEM cluster
    JkMount /AEM/* cluster
    JkMount /servlet cluster
    JkMount /servlet/* cluster
Creating the workers.properties file
  1. Create the workers.properties file in the %APACHE%\conf folder.

  2. Add the following scripts to it.

    For single PowerServer:

    # Define Node1
    worker.list=node1
    worker.node1.port=8009
    worker.node1.host=192.0.2.217
    worker.node1.type=ajp13
    worker.node1.lbfactor=1
    #worker.node1.local_worker=1 (1)
    worker.node1.cachesize=200

    For multiple PowerServer implementing load balancing:

    The following script example shows that there are two JEUS application servers participating in load balancing, and their node names are jiangzepeng and zhangjungang respectively. You can replace them with the real node names of JEUS application servers and add similar scripts to involve other JEUS application servers.

    worker.list=jiangzepeng_servlet_engine1,zhangjungang_servlet_engine1,cluster
    worker.cluster.type=lb
    worker.cluster.balance_workers=jiangzepeng_servlet_engine1,zhangjungang_servlet_engine1
    worker.jiangzepeng_servlet_engine1.port=8009
    worker.jiangzepeng_servlet_engine1.host=192.168.168.35
    worker.jiangzepeng_servlet_engine1.type=ajp13
    worker.jiangzepeng_servlet_engine1.lbfactor=1
    worker.jiangzepeng_servlet_engine1.cachesize=200
    worker.zhangjungang_servlet_engine1.port=8009
    worker.zhangjungang_servlet_engine1.host=192.168.168.217
    worker.zhangjungang_servlet_engine1.type=ajp13
    worker.zhangjungang_servlet_engine1.lbfactor=1
    worker.zhangjungang_servlet_engine1.cachesize=200

    For detailed information on how to configure the directives in workers.properties, visit http://tomcat.apache.org/connectors-doc/reference/workers.html.

Creating the easerverinit.conf file (for load balancing)

Create the easerverinit.conf file in the %Apache%\conf directory and add the following scripts:

# The redirector log file level.
#
# This directive determines the amount of redirector logging that is sent 
# to the Web server log file
# You must also set the logging level for the Apache Web server in the httpd.conf 
# file to either "info" or "error" for the redirector to produce any logging. 
# The syntax is:
#
# LogLevel [ debug | info | notice | warn | error | crit ] 
#
Connector.LogLevel inform
Restarting Apache and JEUS

Restart Apache and JEUS to make the settings effective.